From: Bram Moolenaar Date: Wed, 30 Nov 2011 14:19:28 +0000 (+0100) Subject: updated for version 7.3.360 X-Git-Tag: v7.3.360 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8000baffa7bc80773d4a80769837e73e5c5715b5;p=vim updated for version 7.3.360 Problem: Interrupting the load of an autoload function may cause a crash. Solution: Do not use the hashitem when not valid. (Yukihiro Nakadaira) --- diff --git a/src/eval.c b/src/eval.c index 847495639..d93836a89 100644 --- a/src/eval.c +++ b/src/eval.c @@ -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; } diff --git a/src/version.c b/src/version.c index b186a7368..1eadaec24 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 360, /**/ 359, /**/