patch 9.1.1335: Coverity complains about Null pointer dereferences

Commit: 
https://github.com/vim/vim/commit/362be6ba2700e864f3c755d2366a8088bead21fa
Author: Christian Brabandt <c...@256bit.org>
Date:   Tue Apr 22 20:06:53 2025 +0200

    patch 9.1.1335: Coverity complains about Null pointer dereferences
    
    Problem:  Coverity complains about Null pointer dereferences
    Solution: before accessing ccline->cmdbuff check that ccline is not NULL
    
    Fixes: Coverity issue 1646601
    closes: #17189
    
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/cmdexpand.c b/src/cmdexpand.c
index 5b87d7804..e8bc0805c 100644
--- a/src/cmdexpand.c
+++ b/src/cmdexpand.c
@@ -382,7 +382,7 @@ cmdline_pum_create(
     }
 
     // Compute the popup menu starting column
-    compl_startcol = vim_strsize(ccline->cmdbuff) + 1;
+    compl_startcol = ccline == NULL ? 0 : vim_strsize(ccline->cmdbuff) + 1;
     columns = vim_strsize(xp->xp_pattern);
     if (showtail)
     {
diff --git a/src/version.c b/src/version.c
index 1a17d2e4c..2d36034ab 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1335,
 /**/
     1334,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1u7I9C-001P1d-2X%40256bit.org.

Raspunde prin e-mail lui