]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.242 v7.3.242
authorBram Moolenaar <Bram@vim.org>
Thu, 7 Jul 2011 15:15:33 +0000 (17:15 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 7 Jul 2011 15:15:33 +0000 (17:15 +0200)
Problem:    Illegal memory access in after_pathsep().
Solution:   Check that the pointer is not at the start of the file name.
            (Dominique Pelle)

src/misc2.c
src/version.c

index b7e7d01ea2a2e4d3d2e4103af8681b30563cd57e..dfb1fc487fafe41226c8c2ac01d69d08b708d69f 100644 (file)
@@ -3247,7 +3247,7 @@ get_real_state()
 #if defined(FEAT_MBYTE) || defined(PROTO)
 /*
  * Return TRUE if "p" points to just after a path separator.
- * Take care of multi-byte characters.
+ * Takes care of multi-byte characters.
  * "b" must point to the start of the file name
  */
     int
@@ -3255,7 +3255,7 @@ after_pathsep(b, p)
     char_u     *b;
     char_u     *p;
 {
-    return vim_ispathsep(p[-1])
+    return p > b && vim_ispathsep(p[-1])
                             && (!has_mbyte || (*mb_head_off)(b, p - 1) == 0);
 }
 #endif
index d9b50a6500d25a971711b501ee76a42bec8c49cb..4826a51544c58e71f34653ad7286c29c5d792f94 100644 (file)
@@ -709,6 +709,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    242,
 /**/
     241,
 /**/