Commits

Anonymous committed 5ddb68c

updated for version 7.3.166
Problem: Buffer on the stack may be too big
Solution: Allocate the space.

Comments (0)

Files changed (2)

     int		expand;
 {
     char_u	*s;
-    char_u	buf[MAXPATHL];
+    char_u	*buf;
 
     if (fprintf(fd, "%s %s=", cmd, name) < 0)
 	return FAIL;
 	}
 	else if (expand)
 	{
+	    buf = alloc(MAXPATHL);
+	    if (buf == NULL)
+		return FAIL;
 	    home_replace(NULL, *valuep, buf, MAXPATHL, FALSE);
 	    if (put_escstr(fd, buf, 2) == FAIL)
+	    {
+		vim_free(buf);
 		return FAIL;
+	    }
+	    vim_free(buf);
 	}
 	else if (put_escstr(fd, *valuep, 2) == FAIL)
 	    return FAIL;
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    166,
+/**/
     165,
 /**/
     164,