]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1273: Coverity warns about using uninitialized value v9.1.1273
authorzeertzjq <zeertzjq@outlook.com>
Thu, 3 Apr 2025 19:21:15 +0000 (21:21 +0200)
committerChristian Brabandt <cb@256bit.org>
Thu, 3 Apr 2025 19:21:15 +0000 (21:21 +0200)
Problem:  Coverity warns about using uninitialized value
          (after 9.1.1270).
Solution: Put an empty string in "buf" when allocation fails (zeertzjq).

closes: #17040

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/buffer.c
src/version.c

index 8277b726c2d4106afe1254ca05100e9bd93deea8..90ca596783c6689caa716570b54ce999f492c094 100644 (file)
@@ -4037,6 +4037,8 @@ maketitle(void)
                    vim_strncpy(buf, p, SPACE_FOR_FNAME);
                    vim_free(p);
                }
+               else
+                   STRCPY(buf, "");
            }
 
 #ifdef FEAT_TERMINAL
index 28c02486651171493ee6db685d2b95e56e4bdc9b..e00e0077c03b03e10de94f60b72d1fe5d1739375 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1273,
 /**/
     1272,
 /**/