Skip to content

Commit 12b9431

Browse files
ashamedbitchrisbra
authored andcommitted
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 <muralianiruddhan@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 5291fe8 commit 12b9431

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/if_cscope.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,6 +1232,9 @@ cs_find_common(
12321232
qf_info_T *qi = NULL;
12331233
win_T *wp = NULL;
12341234

1235+
if (tmp == NULL)
1236+
return FALSE;
1237+
12351238
f = mch_fopen((char *)tmp, "w");
12361239
if (f == NULL)
12371240
semsg(_(e_cant_open_file_str), tmp);

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,8 @@ static char *(features[]) =
724724

725725
static int included_patches[] =
726726
{ /* Add new patch number below this line */
727+
/**/
728+
1746,
727729
/**/
728730
1745,
729731
/**/

0 commit comments

Comments
 (0)