Commit: patch 9.1.1746: Missing Null ptr check in cs_find_common()

0 views
Skip to first unread message

Christian Brabandt

unread,
Sep 9, 2025, 3:30:15 PM (2 days ago) Sep 9
to vim...@googlegroups.com
patch 9.1.1746: Missing Null ptr check in cs_find_common()

Commit: https://github.com/vim/vim/commit/12b9431eab62e92eff90618c4fdcd94e54a81043
Author: ashamedbit <muralian...@gmail.com>
Date: Tue Sep 9 15:21:57 2025 -0400

patch 9.1.1746: Missing Null ptr check in cs_find_common()

Problem: Missing Null ptr check in cs_find_common()
Solution: Return when tmp pointer is null (ashamedbit)

fixes: #18225
closes: #18248

Signed-off-by: ashamedbit <muralian...@gmail.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/if_cscope.c b/src/if_cscope.c
index 478a99f16..e571dd754 100644
--- a/src/if_cscope.c
+++ b/src/if_cscope.c
@@ -1232,6 +1232,9 @@ cs_find_common(
qf_info_T *qi = NULL;
win_T *wp = NULL;

+ if (tmp == NULL)
+ return FALSE;
+
f = mch_fopen((char *)tmp, "w");
if (f == NULL)
semsg(_(e_cant_open_file_str), tmp);
diff --git a/src/version.c b/src/version.c
index 46a2bd232..7a08d7a98 100644
--- a/src/version.c
+++ b/src/version.c
@@ -724,6 +724,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1746,
/**/
1745,
/**/
Reply all
Reply to author
Forward
0 new messages