Skip to content

Commit

Permalink
patch 8.2.2585: Vim9: illegal memory access
Browse files Browse the repository at this point in the history
Problem:    Vim9: illegal memory access.
Solution:   Check byte right after "null", not one more.
  • Loading branch information
brammool committed Mar 10, 2021
1 parent d345fb9 commit c23555d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2585,
/**/
2584,
/**/
Expand Down
2 changes: 1 addition & 1 deletion src/vim9compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -4184,7 +4184,7 @@ compile_expr7(
* "null" constant
*/
case 'n': if (STRNCMP(*arg, "null", 4) == 0
&& !eval_isnamec((*arg)[5]))
&& !eval_isnamec((*arg)[4]))
{
*arg += 4;
rettv->v_type = VAR_SPECIAL;
Expand Down

0 comments on commit c23555d

Please sign in to comment.