updated for version 7.3.242
Problem: Illegal memory access in after_pathsep().
Solution: Check that the pointer is not at the start of the file name.
(Dominique Pelle)
diff --git a/src/misc2.c b/src/misc2.c
index b7e7d01..dfb1fc4 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -3247,7 +3247,7 @@
#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 @@
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
diff --git a/src/version.c b/src/version.c
index d9b50a6..4826a51 100644
--- a/src/version.c
+++ b/src/version.c
@@ -710,6 +710,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 242,
+/**/
241,
/**/
240,