aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
diff options
context:
space:
mode:
authorJurica Bradaric <jbradaric@gmail.com>2016-02-02 20:00:11 +0100
committerJurica Bradaric <jbradaric@gmail.com>2016-02-02 20:06:35 +0100
commit105f98fbf87182c9551f24d1a913e1e4b8e6646a (patch)
treedede5804531a87e2d6cc70935dfdd5267a683b81 /src/nvim/eval.c
parentce2ff1ac0134d2b3b56eee1862d846e1fe9e4caf (diff)
downloadrneovim-105f98fbf87182c9551f24d1a913e1e4b8e6646a.tar.gz
rneovim-105f98fbf87182c9551f24d1a913e1e4b8e6646a.tar.bz2
rneovim-105f98fbf87182c9551f24d1a913e1e4b8e6646a.zip
vim-patch:7.4.815
Problem: Invalid memory access when doing ":call g:". Solution: Check for an empty name. (Dominique Pelle) https://github.com/vim/vim/commit/73627d0bd43e63a67995ab1c826f1cec4ed22560
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r--src/nvim/eval.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 6c471ab770..109504037d 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -18578,6 +18578,9 @@ static hashtab_T *find_var_ht_dict(char_u *name, uint8_t **varname, dict_T **d)
hashitem_T *hi;
*d = NULL;
+ if (name[0] == NUL) {
+ return NULL;
+ }
if (name[1] != ':') {
// name has implicit scope
if (name[0] == ':' || name[0] == AUTOLOAD_CHAR) {
@@ -18627,6 +18630,7 @@ end:
}
// 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 *find_var_ht(uint8_t *name, uint8_t **varname)
{