Skip to content

Commit 068fe80

Browse files
committed
updated for version 7.3.166
Problem: Buffer on the stack may be too big Solution: Allocate the space.
1 parent c4087bd commit 068fe80

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/option.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9185,7 +9185,7 @@ put_setstring(fd, cmd, name, valuep, expand)
91859185
int expand;
91869186
{
91879187
char_u *s;
9188-
char_u buf[MAXPATHL];
9188+
char_u *buf;
91899189

91909190
if (fprintf(fd, "%s %s=", cmd, name) < 0)
91919191
return FAIL;
@@ -9203,9 +9203,16 @@ put_setstring(fd, cmd, name, valuep, expand)
92039203
}
92049204
else if (expand)
92059205
{
9206+
buf = alloc(MAXPATHL);
9207+
if (buf == NULL)
9208+
return FAIL;
92069209
home_replace(NULL, *valuep, buf, MAXPATHL, FALSE);
92079210
if (put_escstr(fd, buf, 2) == FAIL)
9211+
{
9212+
vim_free(buf);
92089213
return FAIL;
9214+
}
9215+
vim_free(buf);
92099216
}
92109217
else if (put_escstr(fd, *valuep, 2) == FAIL)
92119218
return FAIL;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,8 @@ static char *(features[]) =
714714

715715
static int included_patches[] =
716716
{ /* Add new patch number below this line */
717+
/**/
718+
166,
717719
/**/
718720
165,
719721
/**/

0 commit comments

Comments
 (0)