]> granicus.if.org Git - vim/commitdiff
patch 8.2.2585: Vim9: illegal memory access v8.2.2585
authorBram Moolenaar <Bram@vim.org>
Wed, 10 Mar 2021 18:04:07 +0000 (19:04 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 10 Mar 2021 18:04:07 +0000 (19:04 +0100)
Problem:    Vim9: illegal memory access.
Solution:   Check byte right after "null", not one more.

src/version.c
src/vim9compile.c

index 65a3f50192e817355e9aea0b81e0e2de04a3e3cb..b8ce28af882eeb7033e60ad39a1ad8c297762aed 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2585,
 /**/
     2584,
 /**/
index 7c1dca533af422f0d6cacf59b306ae8ae888564f..d29c66b66b883d2b1e1df478dda7566e974642f6 100644 (file)
@@ -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;