]> granicus.if.org Git - vim/commitdiff
patch 7.4.815 v7.4.815
authorBram Moolenaar <Bram@vim.org>
Tue, 11 Aug 2015 13:46:09 +0000 (15:46 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 11 Aug 2015 13:46:09 +0000 (15:46 +0200)
Problem:    Invalid memory access when doing ":call g:".
Solution:   Check for an empty name. (Dominique Pelle)

src/eval.c
src/version.c

index 8238b6ec6391d7f484257ef36a87176616492350..cc9e8788128a5a893161716f420caf25a4ca94ae 100644 (file)
@@ -21371,6 +21371,7 @@ find_var_in_ht(ht, htname, varname, no_autoload)
 
 /*
  * Find the hashtab used for a variable name.
+ * Return NULL if the name is not valid.
  * Set "varname" to the start of name without ':'.
  */
     static hashtab_T *
@@ -21380,6 +21381,8 @@ find_var_ht(name, varname)
 {
     hashitem_T *hi;
 
+    if (name[0] == NUL)
+       return NULL;
     if (name[1] != ':')
     {
        /* The name must not start with a colon or #. */
index 53fa03dd1b163a44a61d8b517b5852f7d8c09a67..fc27f4146ac8a9774194724c31a18b24274e1a5e 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    815,
 /**/
     814,
 /**/