diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-02-09 01:58:54 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-02-09 01:58:54 -0500 |
commit | b9701c2a2b7b4633e894ad62955e0a0039dc0f95 (patch) | |
tree | 970a236df8b1ab30b5866487ff00f4e49c7c71bf /src/nvim/eval.c | |
parent | 17ae27190d4589b2a35f44bc6c8b552f4bf06d4e (diff) | |
parent | 52692d3cd3e682a4116d3cec1fcf05880f0c77a1 (diff) | |
download | rneovim-b9701c2a2b7b4633e894ad62955e0a0039dc0f95.tar.gz rneovim-b9701c2a2b7b4633e894ad62955e0a0039dc0f95.tar.bz2 rneovim-b9701c2a2b7b4633e894ad62955e0a0039dc0f95.zip |
Merge #4152 'vim-patch:7.4.{798,800,805,810,811,814,815,816,817,820,825}'.
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 969a03fce3..8971b6d463 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -18587,6 +18587,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) { @@ -18636,6 +18639,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) { @@ -19631,7 +19635,10 @@ void ex_function(exarg_T *eap) break; } } - ++p; /* skip the ')' */ + if (*p != ')') { + goto erret; + } + ++p; // skip the ')' /* find extra arguments "range", "dict" and "abort" */ for (;; ) { |