# HG changeset patch # User Bram Moolenaar # Date 1350182145 -7200 # Node ID caa0ca9ad06cb515b7e6d2e4410e03802b58e167 # Parent 7c95e59d681d88da01fcb589867dfc68d0a00a5b 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) diff --git a/src/os_unix.c b/src/os_unix.c --- a/src/os_unix.c +++ b/src/os_unix.c @@ -2512,15 +2512,12 @@ mch_FullName(fname, buf, len, force) } 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 } diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -720,6 +720,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 690, +/**/ 689, /**/ 688,