From: ashamedbit Date: Tue, 9 Sep 2025 19:21:57 +0000 (-0400) Subject: patch 9.1.1746: Missing Null ptr check in cs_find_common() X-Git-Tag: v9.1.1746^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12b9431eab62e92eff90618c4fdcd94e54a81043;p=thirdparty%2Fvim.git 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 Signed-off-by: Christian Brabandt --- diff --git a/src/if_cscope.c b/src/if_cscope.c index 478a99f16d..e571dd754d 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 46a2bd2321..7a08d7a98f 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, /**/