4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Crash when expanding an ":edit" command containing several spaces
12 with the shell. (Brian Hirt)
13 Solution: Allocate enough space for the quotes.
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
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 */
31 /* "unset nonomatch; print -N >" plus two is 29 */
32 len = STRLEN(tempname) + 29;
33 ! for (i = 0; i < num_pat; ++i)
35 ! /* Count the length of the patterns in the same way as they are put in
36 ! * "command" below. */
38 len += STRLEN(pat[i]) + 3; /* add space and two quotes */
40 + ++len; /* add space */
41 + for (j = 0; pat[i][j] != NUL; )
42 + if (vim_strchr((char_u *)" '", pat[i][j]) != NULL)
44 + len += 2; /* add two quotes */
45 + while (pat[i][j] != NUL
46 + && vim_strchr((char_u *)" '", pat[i][j]) != NULL)
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
67 { /* Add new patch number below this line */
73 The budget process was invented by an alien race of sadistic beings who
75 (Scott Adams - The Dilbert principle)
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 ///