]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.360 v7.3.360
authorBram Moolenaar <Bram@vim.org>
Wed, 30 Nov 2011 14:19:28 +0000 (15:19 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 30 Nov 2011 14:19:28 +0000 (15:19 +0100)
Problem:    Interrupting the load of an autoload function may cause a crash.
Solution:   Do not use the hashitem when not valid. (Yukihiro Nakadaira)

src/eval.c
src/version.c

index 84749563987261aa0dabf414a2edd7416ccc34d2..d93836a8940157f49190bb055cc6c8570709349f 100644 (file)
@@ -19589,9 +19589,14 @@ find_var_in_ht(ht, varname, writing)
         * worked find the variable again.  Don't auto-load a script if it was
         * loaded already, otherwise it would be loaded every time when
         * checking if a function name is a Funcref variable. */
-       if (ht == &globvarht && !writing
-                           && script_autoload(varname, FALSE) && !aborting())
+       if (ht == &globvarht && !writing)
+       {
+           /* Note: script_autoload() may make "hi" invalid. It must either
+            * be obtained again or not used. */
+           if (!script_autoload(varname, FALSE) || aborting())
+               return NULL;
            hi = hash_find(ht, varname);
+       }
        if (HASHITEM_EMPTY(hi))
            return NULL;
     }
index b186a7368ff9780712732b71adf860ed12ef3612..1eadaec242f993f26f2681e63f0a22c43f538a0f 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    360,
 /**/
     359,
 /**/