0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -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:
Bram Moolenaar
2020-10-26 21:39:13 +01:00
parent cb80aa2d53
commit caf73dcfad
3 changed files with 12 additions and 2 deletions

View File

@@ -2958,8 +2958,7 @@ undo_cmdmod(cmdmod_T *cmod)
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)
{
@@ -4696,6 +4695,8 @@ separate_nextcmd(exarg_T *eap)
{
p += 2;
(void)skip_expr(&p, NULL);
if (*p == NUL) // stop at NUL after CTRL-V
break;
}
#endif