0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.2585: Vim9: illegal memory access

Problem:    Vim9: illegal memory access.
Solution:   Check byte right after "null", not one more.
This commit is contained in:
Bram Moolenaar
2021-03-10 19:04:07 +01:00
parent d345fb9216
commit c23555de34
2 changed files with 3 additions and 1 deletions

View File

@@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
2585,
/**/ /**/
2584, 2584,
/**/ /**/

View File

@@ -4184,7 +4184,7 @@ compile_expr7(
* "null" constant * "null" constant
*/ */
case 'n': if (STRNCMP(*arg, "null", 4) == 0 case 'n': if (STRNCMP(*arg, "null", 4) == 0
&& !eval_isnamec((*arg)[5])) && !eval_isnamec((*arg)[4]))
{ {
*arg += 4; *arg += 4;
rettv->v_type = VAR_SPECIAL; rettv->v_type = VAR_SPECIAL;