mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 9.0.1846: [security] crash in fullcommand
Problem: crash in fullcommand Solution: Check for typeval correctly Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -4087,7 +4087,7 @@ f_fullcommand(typval_T *argvars, typval_T *rettv)
|
|||||||
|| check_for_opt_bool_arg(argvars, 1) == FAIL))
|
|| check_for_opt_bool_arg(argvars, 1) == FAIL))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
name = argvars[0].vval.v_string;
|
name = tv_get_string(&argvars[0]);
|
||||||
if (name == NULL)
|
if (name == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@@ -3607,4 +3607,9 @@ func Test_string_reverse()
|
|||||||
let &encoding = save_enc
|
let &encoding = save_enc
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_fullcommand()
|
||||||
|
" this used to crash vim
|
||||||
|
call assert_equal('', fullcommand(10))
|
||||||
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@@ -699,6 +699,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 */
|
||||||
|
/**/
|
||||||
|
1846,
|
||||||
/**/
|
/**/
|
||||||
1845,
|
1845,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user