]> git.pld-linux.org Git - packages/vim.git/blame - 7.3.166
- new
[packages/vim.git] / 7.3.166
CommitLineData
aafb5bd2 1To: vim_dev@googlegroups.com
2Subject: Patch 7.3.166
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 7.3.166
11Problem: Buffer on the stack may be too big
12Solution: Allocate the space.
13Files: src/option.c
14
15
16*** ../vim-7.3.165/src/option.c 2011-04-28 12:56:57.000000000 +0200
17--- src/option.c 2011-04-15 20:49:54.000000000 +0200
18***************
19*** 9185,9191 ****
20 int expand;
21 {
22 char_u *s;
23! char_u buf[MAXPATHL];
24
25 if (fprintf(fd, "%s %s=", cmd, name) < 0)
26 return FAIL;
27--- 9185,9191 ----
28 int expand;
29 {
30 char_u *s;
31! char_u *buf;
32
33 if (fprintf(fd, "%s %s=", cmd, name) < 0)
34 return FAIL;
35***************
36*** 9203,9211 ****
37--- 9203,9218 ----
38 }
39 else if (expand)
40 {
41+ buf = alloc(MAXPATHL);
42+ if (buf == NULL)
43+ return FAIL;
44 home_replace(NULL, *valuep, buf, MAXPATHL, FALSE);
45 if (put_escstr(fd, buf, 2) == FAIL)
46+ {
47+ vim_free(buf);
48 return FAIL;
49+ }
50+ vim_free(buf);
51 }
52 else if (put_escstr(fd, *valuep, 2) == FAIL)
53 return FAIL;
54*** ../vim-7.3.165/src/version.c 2011-04-28 17:21:49.000000000 +0200
55--- src/version.c 2011-04-28 17:23:24.000000000 +0200
56***************
57*** 716,717 ****
58--- 716,719 ----
59 { /* Add new patch number below this line */
60+ /**/
61+ 166,
62 /**/
63
64--
65He who laughs last, thinks slowest.
66
67 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
68/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
69\\\ an exciting new programming language -- http://www.Zimbu.org ///
70 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
This page took 0.045876 seconds and 4 git commands to generate.