patch 9.1.1273: Coverity warns about using uninitialized value

Commit: 
https://github.com/vim/vim/commit/f16d8b2dda077d8252c3f7d19e6a5bc15d1d51c1
Author: zeertzjq <zeert...@outlook.com>
Date:   Thu Apr 3 21:21:15 2025 +0200

    patch 9.1.1273: Coverity warns about using uninitialized value
    
    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 <zeert...@outlook.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/buffer.c b/src/buffer.c
index 8277b726c..90ca59678 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -4037,6 +4037,8 @@ maketitle(void)
                    vim_strncpy(buf, p, SPACE_FOR_FNAME);
                    vim_free(p);
                }
+               else
+                   STRCPY(buf, "");
            }
 
 #ifdef FEAT_TERMINAL
diff --git a/src/version.c b/src/version.c
index 28c024866..e00e0077c 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 */
+/**/
+    1273,
 /**/
     1272,
 /**/

-- 
-- 
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/E1u0QGN-00G3CX-13%40256bit.org.

Raspunde prin e-mail lui