]> granicus.if.org Git - vim/commitdiff
patch 7.4.814 v7.4.814
authorBram Moolenaar <Bram@vim.org>
Tue, 11 Aug 2015 13:27:13 +0000 (15:27 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 11 Aug 2015 13:27:13 +0000 (15:27 +0200)
Problem:    Illegal memory access with "sy match a fold".
Solution:   Check for empty string. (Dominique Pelle)

src/syntax.c
src/version.c

index 6900d573dbfbf3f0260bee3c5044556ad6fd4871..000d5984ccd813e2aa4c85b3e9a3e5098c33cb02 100644 (file)
@@ -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);
index 862759c15bb29e3427aced1b5f560650f8a28fd0..53fa03dd1b163a44a61d8b517b5852f7d8c09a67 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    814,
 /**/
     813,
 /**/