Skip to content

Commit 48a6048

Browse files
committed
patch 8.2.4269: Coverity warns for using a NULL pointer
Problem: Coverity warns for using a NULL pointer. Solution: Check for "name" to not be NULL.
1 parent 44d1f89 commit 48a6048

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/userfunc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4232,7 +4232,8 @@ define_function(exarg_T *eap, char_u *name_arg, garray_T *lines_to_free)
42324232
name = prefixed;
42334233
}
42344234
}
4235-
else if (vim9script && vim_strchr(name, AUTOLOAD_CHAR) != NULL)
4235+
else if (vim9script && name != NULL
4236+
&& vim_strchr(name, AUTOLOAD_CHAR) != NULL)
42364237
{
42374238
emsg(_(e_cannot_use_name_with_hash_in_vim9_script_use_export_instead));
42384239
goto ret_free;

src/version.c

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

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
4269,
753755
/**/
754756
4268,
755757
/**/

0 commit comments

Comments
 (0)