diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-10-14 04:35:45 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-10-14 04:35:45 +0200 |
commit | dac7569612d4088084ef81dfc32c3bb86aec090f (patch) | |
tree | da092f050d6e6d7cf67e8635bc55d8f9cf062b31 | |
parent | d04da7cb4afe77de05e4e08e7e86e504be6759e0 (diff) | |
download | vim-git-dac7569612d4088084ef81dfc32c3bb86aec090f.tar.gz |
updated for version 7.3.690v7.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)
-rw-r--r-- | src/os_unix.c | 11 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 2ef589350..ae41579dc 100644 --- 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 index 0ea098b92..01d679301 100644 --- 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, |