forked from aniani/vim
updated for version 7.4.465
Problem: Crash when expanding a very long string. Solution: Use wsncpy() instead of wcscpy(). (Ken Takata)
This commit is contained in:
@@ -2775,9 +2775,10 @@ fname_case(
|
|||||||
if (p != NULL)
|
if (p != NULL)
|
||||||
{
|
{
|
||||||
char_u *q;
|
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);
|
vim_free(p);
|
||||||
|
|
||||||
if (fname_casew(buf, (len > 0) ? _MAX_PATH : 0) == OK)
|
if (fname_casew(buf, (len > 0) ? _MAX_PATH : 0) == OK)
|
||||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
465,
|
||||||
/**/
|
/**/
|
||||||
464,
|
464,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user