mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
updated for version 7.3.166
Problem: Buffer on the stack may be too big Solution: Allocate the space.
This commit is contained in:
@@ -9185,7 +9185,7 @@ put_setstring(fd, cmd, name, valuep, expand)
|
|||||||
int expand;
|
int expand;
|
||||||
{
|
{
|
||||||
char_u *s;
|
char_u *s;
|
||||||
char_u buf[MAXPATHL];
|
char_u *buf;
|
||||||
|
|
||||||
if (fprintf(fd, "%s %s=", cmd, name) < 0)
|
if (fprintf(fd, "%s %s=", cmd, name) < 0)
|
||||||
return FAIL;
|
return FAIL;
|
||||||
@@ -9203,9 +9203,16 @@ put_setstring(fd, cmd, name, valuep, expand)
|
|||||||
}
|
}
|
||||||
else if (expand)
|
else if (expand)
|
||||||
{
|
{
|
||||||
|
buf = alloc(MAXPATHL);
|
||||||
|
if (buf == NULL)
|
||||||
|
return FAIL;
|
||||||
home_replace(NULL, *valuep, buf, MAXPATHL, FALSE);
|
home_replace(NULL, *valuep, buf, MAXPATHL, FALSE);
|
||||||
if (put_escstr(fd, buf, 2) == FAIL)
|
if (put_escstr(fd, buf, 2) == FAIL)
|
||||||
|
{
|
||||||
|
vim_free(buf);
|
||||||
return FAIL;
|
return FAIL;
|
||||||
|
}
|
||||||
|
vim_free(buf);
|
||||||
}
|
}
|
||||||
else if (put_escstr(fd, *valuep, 2) == FAIL)
|
else if (put_escstr(fd, *valuep, 2) == FAIL)
|
||||||
return FAIL;
|
return FAIL;
|
||||||
|
@@ -714,6 +714,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 */
|
||||||
|
/**/
|
||||||
|
166,
|
||||||
/**/
|
/**/
|
||||||
165,
|
165,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user