Problem: When the current directory name is exactly the maximum path length
Vim may crash.
Solution: Only add "/" when there is room. (Danek Duvall)
}
l = STRLEN(buf);
- if (l >= len)
- retval = FAIL;
+ if (l >= len - 1)
+ retval = FAIL; /* no space for trailing "/" */
#ifndef VMS
- else
- {
- if (l > 0 && buf[l - 1] != '/' && *fname != NUL
+ else if (l > 0 && buf[l - 1] != '/' && *fname != NUL
&& STRCMP(fname, ".") != 0)
- STRCAT(buf, "/");
- }
+ STRCAT(buf, "/");
#endif
}
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 690,
/**/
689,
/**/