changeset 24087:92139c21cdfd v8.2.2585

patch 8.2.2585: Vim9: illegal memory access Commit: https://github.com/vim/vim/commit/c23555de346c53f8f6c478635c2d9e5f2992dd7f Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 10 19:04:07 2021 +0100 patch 8.2.2585: Vim9: illegal memory access Problem: Vim9: illegal memory access. Solution: Check byte right after "null", not one more.
author Bram Moolenaar <Bram@vim.org>
date Wed, 10 Mar 2021 19:15:03 +0100
parents f5dc00154021
children 03ee5ad8e15a
files src/version.c src/vim9compile.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2585,
+/**/
     2584,
 /**/
     2583,
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -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;