mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
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:
parent
f43e7ac4ee
commit
1b9129809d
@ -2304,6 +2304,8 @@ f_mapset(typval_T *argvars, typval_T *rettv UNUSED)
|
|||||||
char_u *arg;
|
char_u *arg;
|
||||||
|
|
||||||
which = tv_get_string_buf_chk(&argvars[0], buf);
|
which = tv_get_string_buf_chk(&argvars[0], buf);
|
||||||
|
if (which == NULL)
|
||||||
|
return;
|
||||||
mode = get_map_mode(&which, 0);
|
mode = get_map_mode(&which, 0);
|
||||||
is_abbr = (int)tv_get_number(&argvars[1]);
|
is_abbr = (int)tv_get_number(&argvars[1]);
|
||||||
|
|
||||||
|
@ -238,6 +238,8 @@ func Test_mapset()
|
|||||||
iunmap K
|
iunmap K
|
||||||
let &cpo = cpo_save
|
let &cpo = cpo_save
|
||||||
bwipe!
|
bwipe!
|
||||||
|
|
||||||
|
call assert_fails('call mapset([], v:false, {})', 'E730:')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Check_ctrlb_map(d, check_alt)
|
func Check_ctrlb_map(d, check_alt)
|
||||||
|
@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1773,
|
||||||
/**/
|
/**/
|
||||||
1772,
|
1772,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user