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:
Jurica Bradaric 2016-02-02 19:56:18 +01:00
parent f20818de31
commit ce2ff1ac01
2 changed files with 4 additions and 3 deletions

View File

@ -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 */

View File

@ -474,7 +474,7 @@ static int included_patches[] = {
// 817,
// 816,
// 815,
// 814,
814,
813,
// 812,
811,