]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.690 v7.3.690
authorBram Moolenaar <Bram@vim.org>
Sun, 14 Oct 2012 02:35:45 +0000 (04:35 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 14 Oct 2012 02:35:45 +0000 (04:35 +0200)
Problem:    When the current directory name is exactly the maximum path length
            Vim may crash.
Solution:   Only add "/" when there is room. (Danek Duvall)

src/os_unix.c
src/version.c

index 2ef589350208a8a546287a62fbc7d9cfe6b787ce..ae41579dc5fc4ba9db2e27bfba2dff8af2c56526 100644 (file)
@@ -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
     }
 
index 0ea098b92efe462710d9570ffeea895b0e4ac002..01d67930180d964e9cf2f3feea4ad04300acaea3 100644 (file)
@@ -719,6 +719,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    690,
 /**/
     689,
 /**/