diff options
author | Bram Moolenaar <bram@vim.org> | 2015-08-11 15:46:09 +0200 |
---|---|---|
committer | Bram Moolenaar <bram@vim.org> | 2015-08-11 15:46:09 +0200 |
commit | 1b71a2e5725ebb4e14e4e58a709d8bd84c0ac512 (patch) | |
tree | 90ee22bbc51db2fea9ad4eaeef6560295d243828 | |
parent | dc7cc4961f51c6fd03b3499a7461787db92c9fd8 (diff) | |
download | vim-1b71a2e5725ebb4e14e4e58a709d8bd84c0ac512.tar.gz |
Problem: Invalid memory access when doing ":call g:".
Solution: Check for an empty name. (Dominique Pelle)
-rw-r--r-- | src/eval.c | 3 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 5 insertions, 0 deletions
@@ -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 #. */ diff --git a/src/version.c b/src/version.c index 53fa03dd..fc27f414 100644 --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 815, +/**/ 814, /**/ 813, |