]> git.pld-linux.org Git - packages/vim.git/blame - 6.3.059
- new
[packages/vim.git] / 6.3.059
CommitLineData
1c1314e9
AG
1To: vim-dev@vim.org
2Subject: Patch 6.3.059
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=ISO-8859-1
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 6.3.059
11Problem: Crash when expanding an ":edit" command containing several spaces
12 with the shell. (Brian Hirt)
13Solution: Allocate enough space for the quotes.
14Files: src/os_unix.c
15
16
17*** ../vim-6.3.058/src/os_unix.c Sat Sep 18 20:28:07 2004
18--- src/os_unix.c Sat Jan 29 15:07:53 2005
19***************
20*** 4735,4742 ****
21
22 /* "unset nonomatch; print -N >" plus two is 29 */
23 len = STRLEN(tempname) + 29;
24! for (i = 0; i < num_pat; ++i) /* count the length of the patterns */
25 len += STRLEN(pat[i]) + 3; /* add space and two quotes */
26 command = alloc(len);
27 if (command == NULL)
28 {
29--- 4735,4766 ----
30
31 /* "unset nonomatch; print -N >" plus two is 29 */
32 len = STRLEN(tempname) + 29;
33! for (i = 0; i < num_pat; ++i)
34! {
35! /* Count the length of the patterns in the same way as they are put in
36! * "command" below. */
37! #ifdef USE_SYSTEM
38 len += STRLEN(pat[i]) + 3; /* add space and two quotes */
39+ #else
40+ ++len; /* add space */
41+ for (j = 0; pat[i][j] != NUL; )
42+ if (vim_strchr((char_u *)" '", pat[i][j]) != NULL)
43+ {
44+ len += 2; /* add two quotes */
45+ while (pat[i][j] != NUL
46+ && vim_strchr((char_u *)" '", pat[i][j]) != NULL)
47+ {
48+ ++len;
49+ ++j;
50+ }
51+ }
52+ else
53+ {
54+ ++len;
55+ ++j;
56+ }
57+ #endif
58+ }
59 command = alloc(len);
60 if (command == NULL)
61 {
62*** ../vim-6.3.058/src/version.c Tue Jan 18 10:53:53 2005
63--- src/version.c Sat Jan 29 16:11:00 2005
64***************
65*** 643,644 ****
66--- 643,646 ----
67 { /* Add new patch number below this line */
68+ /**/
69+ 59,
70 /**/
71
72--
73The budget process was invented by an alien race of sadistic beings who
74resemble large cats.
75 (Scott Adams - The Dilbert principle)
76
77 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
78/// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
79\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
80 \\\ Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html ///
This page took 0.039935 seconds and 4 git commands to generate.