Skip to content

Commit

Permalink
patch 8.2.4417: using NULL pointer
Browse files Browse the repository at this point in the history
Problem:    Using NULL pointer.
Solution:   Set offset after checking for NULL pointer.
  • Loading branch information
brammool committed Feb 18, 2022
1 parent 1fca5f3 commit e89bfd2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/userfunc.c
Expand Up @@ -4024,7 +4024,7 @@ untrans_function_name(char_u *name)
get_scriptlocal_funcname(char_u *funcname)
{
char sid_buf[25];
int off = *funcname == 's' ? 2 : 5;
int off;
char_u *newname;
char_u *p = funcname;

Expand All @@ -4047,6 +4047,8 @@ get_scriptlocal_funcname(char_u *funcname)
++p;
off = 0;
}
else
off = *funcname == 's' ? 2 : 5;

if (!SCRIPT_ID_VALID(current_sctx.sc_sid))
{
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -750,6 +750,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
4417,
/**/
4416,
/**/
Expand Down

0 comments on commit e89bfd2

Please sign in to comment.