mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.814
Problem: Illegal memory access with "sy match a fold".
Solution: Check for empty string. (Dominique Pelle)
382197865c
This commit is contained in:
parent
f20818de31
commit
ce2ff1ac01
@ -4843,9 +4843,10 @@ static char_u *get_syn_pattern(char_u *arg, synpat_T *ci)
|
||||
int idx;
|
||||
char_u *cpo_save;
|
||||
|
||||
/* need at least three chars */
|
||||
if (arg == NULL || arg[1] == NUL || arg[2] == NUL)
|
||||
// need at least three chars
|
||||
if (arg == NULL || arg[0] == NUL || arg[1] == NUL || arg[2] == NUL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
end = skip_regexp(arg + 1, *arg, TRUE, NULL);
|
||||
if (*end != *arg) { /* end delimiter not found */
|
||||
|
@ -474,7 +474,7 @@ static int included_patches[] = {
|
||||
// 817,
|
||||
// 816,
|
||||
// 815,
|
||||
// 814,
|
||||
814,
|
||||
813,
|
||||
// 812,
|
||||
811,
|
||||
|
Loading…
Reference in New Issue
Block a user