mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.1910: reading past the end of the command line
Problem: Reading past the end of the command line. Solution: Check for NUL. (closes #7204)
This commit is contained in:
parent
cb80aa2d53
commit
caf73dcfad
@ -2958,8 +2958,7 @@ undo_cmdmod(cmdmod_T *cmod)
|
|||||||
cmod->cmod_save_ei = NULL;
|
cmod->cmod_save_ei = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmod->cmod_filter_regmatch.regprog != NULL)
|
vim_regfree(cmod->cmod_filter_regmatch.regprog);
|
||||||
vim_regfree(cmod->cmod_filter_regmatch.regprog);
|
|
||||||
|
|
||||||
if (cmod->cmod_save_msg_silent > 0)
|
if (cmod->cmod_save_msg_silent > 0)
|
||||||
{
|
{
|
||||||
@ -4696,6 +4695,8 @@ separate_nextcmd(exarg_T *eap)
|
|||||||
{
|
{
|
||||||
p += 2;
|
p += 2;
|
||||||
(void)skip_expr(&p, NULL);
|
(void)skip_expr(&p, NULL);
|
||||||
|
if (*p == NUL) // stop at NUL after CTRL-V
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1832,4 +1832,11 @@ func Test_edit_browse()
|
|||||||
bwipe!
|
bwipe!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_read_invalid()
|
||||||
|
set encoding=latin1
|
||||||
|
" This was not properly checking for going past the end.
|
||||||
|
call assert_fails('r`=', 'E484')
|
||||||
|
set encoding=utf-8
|
||||||
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
@ -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 */
|
||||||
|
/**/
|
||||||
|
1910,
|
||||||
/**/
|
/**/
|
||||||
1909,
|
1909,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user