Skip to content

Commit b20d257

Browse files
committed
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)
1 parent 195add0 commit b20d257

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/misc2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3247,15 +3247,15 @@ get_real_state()
32473247
#if defined(FEAT_MBYTE) || defined(PROTO)
32483248
/*
32493249
* Return TRUE if "p" points to just after a path separator.
3250-
* Take care of multi-byte characters.
3250+
* Takes care of multi-byte characters.
32513251
* "b" must point to the start of the file name
32523252
*/
32533253
int
32543254
after_pathsep(b, p)
32553255
char_u *b;
32563256
char_u *p;
32573257
{
3258-
return vim_ispathsep(p[-1])
3258+
return p > b && vim_ispathsep(p[-1])
32593259
&& (!has_mbyte || (*mb_head_off)(b, p - 1) == 0);
32603260
}
32613261
#endif

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,8 @@ static char *(features[]) =
709709

710710
static int included_patches[] =
711711
{ /* Add new patch number below this line */
712+
/**/
713+
242,
712714
/**/
713715
241,
714716
/**/

0 commit comments

Comments
 (0)