mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.825
Problem: Invalid memory access for ":syn keyword x a[".
Solution: Do not skip over the NUL. (Dominique Pelle)
1560d07045
This commit is contained in:
parent
8d5cfe4ffc
commit
52692d3cd3
@ -4183,12 +4183,14 @@ static void syn_cmd_keyword(exarg_T *eap, int syncing)
|
||||
break;
|
||||
if (p[1] == NUL) {
|
||||
EMSG2(_("E789: Missing ']': %s"), kw);
|
||||
kw = p + 2; /* skip over the NUL */
|
||||
break;
|
||||
goto error;
|
||||
}
|
||||
if (p[1] == ']') {
|
||||
kw = p + 1; /* skip over the "]" */
|
||||
break;
|
||||
if (p[2] != NUL) {
|
||||
EMSG3(_("E890: trailing char after ']': %s]%s"),
|
||||
kw, &p[2]);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
if (has_mbyte) {
|
||||
int l = (*mb_ptr2len)(p + 1);
|
||||
@ -4203,6 +4205,7 @@ static void syn_cmd_keyword(exarg_T *eap, int syncing)
|
||||
}
|
||||
}
|
||||
|
||||
error:
|
||||
xfree(keyword_copy);
|
||||
xfree(syn_opt_arg.cont_in_list);
|
||||
xfree(syn_opt_arg.next_list);
|
||||
|
@ -463,7 +463,7 @@ static int included_patches[] = {
|
||||
// 828,
|
||||
// 827,
|
||||
826,
|
||||
// 825,
|
||||
825,
|
||||
// 824 NA
|
||||
823,
|
||||
// 822,
|
||||
|
Loading…
Reference in New Issue
Block a user