patch 9.1.1015: Coverity complains about dereferencing NULL value

Commit: 
https://github.com/vim/vim/commit/1ac53b84ada3a992f320566737e66fa00d48611f
Author: Christian Brabandt <c...@256bit.org>
Date:   Tue Jan 14 17:25:02 2025 +0100

    patch 9.1.1015: Coverity complains about dereferencing NULL value
    
    Problem:  Coverity complains about dereferencing NULL value
    Solution: Check that cms2 is not null
    
    closes: #16438
    
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/fold.c b/src/fold.c
index 3353cc55f..64f9447b7 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -1879,7 +1879,7 @@ foldDelMarker(linenr_T lnum, char_u *marker, int 
markerlen)
            {
                // Also delete 'commentstring' if it matches.
                cms2 = (char_u *)strstr((char *)cms, "%s");
-               if (p - line >= cms2 - cms
+               if (cms2 != NULL && p - line >= cms2 - cms
                        && STRNCMP(p - (cms2 - cms), cms, cms2 - cms) == 0
                        && STRNCMP(p + len, cms2 + 2, STRLEN(cms2 + 2)) == 0)
                {
diff --git a/src/version.c b/src/version.c
index 57d7ec7d4..96a51da80 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 */
+/**/
+    1015,
 /**/
     1014,
 /**/

-- 
-- 
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/E1tXjnx-00BqlP-K4%40256bit.org.

Raspunde prin e-mail lui