Problem: Reading past the end of the command line.
Solution: Check for NUL. (closes #7204)
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)
{
{
p += 2;
(void)skip_expr(&p, NULL);
+ if (*p == NUL) // stop at NUL after CTRL-V
+ break;
}
#endif
bwipe!
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
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1910,
/**/
1909,
/**/