Mercurial > vim
changeset 6995:fc099c55a36a v7.4.815
patch 7.4.815
Problem: Invalid memory access when doing ":call g:".
Solution: Check for an empty name. (Dominique Pelle)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 11 Aug 2015 15:46:09 +0200 |
parents | 0b27ef95a7a0 |
children | 89686806b233 |
files | src/eval.c src/version.c |
diffstat | 2 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/eval.c +++ b/src/eval.c @@ -21371,6 +21371,7 @@ find_var_in_ht(ht, htname, varname, no_a /* * 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 #. */