]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1746: Missing Null ptr check in cs_find_common() v9.1.1746
authorashamedbit <muralianiruddhan@gmail.com>
Tue, 9 Sep 2025 19:21:57 +0000 (15:21 -0400)
committerChristian Brabandt <cb@256bit.org>
Tue, 9 Sep 2025 19:21:57 +0000 (15:21 -0400)
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 <muralianiruddhan@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/if_cscope.c
src/version.c

index 478a99f16da28b4ffd77a7ad0f92afc2f9a96521..e571dd754d61985a8977d4392fcbc4209dd22b35 100644 (file)
@@ -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);
index 46a2bd23214a846ce540d1b4c70b5df475ef166b..7a08d7a98fcc16edcd2b6599afe5b342f7f0c572 100644 (file)
@@ -724,6 +724,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1746,
 /**/
     1745,
 /**/