# HG changeset patch # User Bram Moolenaar # Date 1439299633 -7200 # Node ID dcc108222d704bbf6ac21cac3ad3b7324b2e45f1 # Parent 942510a7c61bcdb20401012fd2aac92804a063e5 patch 7.4.814 Problem: Illegal memory access with "sy match a fold". Solution: Check for empty string. (Dominique Pelle) diff --git a/src/syntax.c b/src/syntax.c --- a/src/syntax.c +++ b/src/syntax.c @@ -5654,7 +5654,7 @@ get_syn_pattern(arg, ci) char_u *cpo_save; /* need at least three chars */ - if (arg == NULL || arg[1] == NUL || arg[2] == NUL) + if (arg == NULL || arg[0] == NUL || arg[1] == NUL || arg[2] == NUL) return NULL; end = skip_regexp(arg + 1, *arg, TRUE, NULL); diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 814, +/**/ 813, /**/ 812,