Skip to content

Commit 4fa78fd

Browse files
committed
updated for version 7.3.690
Problem: When the current directory name is exactly the maximum path length Vim may crash. Solution: Only add "/" when there is room. (Danek Duvall)
1 parent 99b7640 commit 4fa78fd

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/os_unix.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2512,15 +2512,12 @@ mch_FullName(fname, buf, len, force)
25122512
}
25132513

25142514
l = STRLEN(buf);
2515-
if (l >= len)
2516-
retval = FAIL;
2515+
if (l >= len - 1)
2516+
retval = FAIL; /* no space for trailing "/" */
25172517
#ifndef VMS
2518-
else
2519-
{
2520-
if (l > 0 && buf[l - 1] != '/' && *fname != NUL
2518+
else if (l > 0 && buf[l - 1] != '/' && *fname != NUL
25212519
&& STRCMP(fname, ".") != 0)
2522-
STRCAT(buf, "/");
2523-
}
2520+
STRCAT(buf, "/");
25242521
#endif
25252522
}
25262523

src/version.c

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

720720
static int included_patches[] =
721721
{ /* Add new patch number below this line */
722+
/**/
723+
690,
722724
/**/
723725
689,
724726
/**/

0 commit comments

Comments
 (0)