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 <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/buffer.c b/src/buffer.c
index 8277b72..90ca596 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -4037,6 +4037,8 @@
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 28c0248..e00e007 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1273,
+/**/
1272,
/**/
1271,