From: Bram Moolenaar Date: Tue, 7 Oct 2014 08:38:40 +0000 (+0200) Subject: updated for version 7.4.465 X-Git-Tag: v7.4.465 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=21d89b610fe2d952a500eaf34cda03c276ef6db6;p=vim updated for version 7.4.465 Problem: Crash when expanding a very long string. Solution: Use wsncpy() instead of wcscpy(). (Ken Takata) --- diff --git a/src/os_win32.c b/src/os_win32.c index 21c3ee9f4..eb66ed2d2 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -2775,9 +2775,10 @@ fname_case( if (p != NULL) { char_u *q; - WCHAR buf[_MAX_PATH + 2]; + WCHAR buf[_MAX_PATH + 1]; - wcscpy(buf, p); + wcsncpy(buf, p, _MAX_PATH); + buf[_MAX_PATH] = L'\0'; vim_free(p); if (fname_casew(buf, (len > 0) ? _MAX_PATH : 0) == OK) diff --git a/src/version.c b/src/version.c index dc9d25d58..c502cdc4b 100644 --- a/src/version.c +++ b/src/version.c @@ -741,6 +741,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 465, /**/ 464, /**/