diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-10-31 15:32:52 +0100 |
---|---|---|
committer | Dan Pasanen <dan.pasanen@gmail.com> | 2015-11-24 10:06:16 -0600 |
commit | 628a8c70b9b8454ee1ad025342a8dd98d76b974b (patch) | |
tree | 9dc38fd97b2691cb937b1d96d0fa04f124aca423 | |
parent | 1e5027c75030b57daafe771e165e6e8a8fbde890 (diff) | |
download | android_external_vim-628a8c70b9b8454ee1ad025342a8dd98d76b974b.tar.gz android_external_vim-628a8c70b9b8454ee1ad025342a8dd98d76b974b.tar.bz2 android_external_vim-628a8c70b9b8454ee1ad025342a8dd98d76b974b.zip |
patch 7.4.903
Problem: MS-Windows: When 'encoding' differs from the current code page,
expandinig wildcards may cause illegal memory access.
Solution: Allocate a longer buffer. (Ken Takata)
-rw-r--r-- | src/misc1.c | 5 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/misc1.c b/src/misc1.c index aacf610ad..fa1e049d3 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -9940,8 +9940,9 @@ dos_expandpath( return 0; } - /* make room for file name */ - buf = alloc((int)STRLEN(path) + BASENAMELEN + 5); + /* Make room for file name. When doing encoding conversion the actual + * length may be quite a bit longer, thus use the maximum possible length. */ + buf = alloc((int)MAXPATHL); if (buf == NULL) return 0; diff --git a/src/version.c b/src/version.c index 410ce8f37..d6fc7d45e 100644 --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 903, +/**/ 902, /**/ 901, |