]> granicus.if.org Git - vim/commitdiff
patch 7.4.820 v7.4.820
authorBram Moolenaar <Bram@vim.org>
Tue, 11 Aug 2015 16:45:48 +0000 (18:45 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 11 Aug 2015 16:45:48 +0000 (18:45 +0200)
Problem:    Invalid memory access in file_pat_to_reg_pat.
Solution:   Avoid looking before the start of a string. (Dominique Pelle)

src/fileio.c
src/version.c

index 973e8ca0e80ee3a21dcece0a1537d9a0a979fef0..0f3f148b9bc657d762a056d2d4f811477a8722ad 100644 (file)
@@ -10210,7 +10210,7 @@ file_pat_to_reg_pat(pat, pat_end, allow_dirs, no_bslash)
     else
        reg_pat[i++] = '^';
     endp = pat_end - 1;
-    if (*endp == '*')
+    if (endp >= pat && *endp == '*')
     {
        while (endp - pat > 0 && *endp == '*')
            endp--;
index e3b885ed333da04480acc62f440ddd851831df54..f8ef512dd3c5b6cac0b29bf6e3d8b6529e4ee396 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    820,
 /**/
     819,
 /**/