1
0
forked from aniani/vim

patch 8.2.1773: crash when calling mapset() with a list as first argument

Problem:    Crash when calling mapset() with a list as first argument.
Solution:   Check for NULL. (closes #7040)
This commit is contained in:
Bram Moolenaar
2020-09-29 21:45:41 +02:00
parent f43e7ac4ee
commit 1b9129809d
3 changed files with 6 additions and 0 deletions

View File

@@ -2304,6 +2304,8 @@ f_mapset(typval_T *argvars, typval_T *rettv UNUSED)
char_u *arg;
which = tv_get_string_buf_chk(&argvars[0], buf);
if (which == NULL)
return;
mode = get_map_mode(&which, 0);
is_abbr = (int)tv_get_number(&argvars[1]);