4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Overlapping arguments for strcpy() when expanding command line
13 Solution: Use mch_memmove() instead of STRCPY(). Also fix a few typos.
18 *** ../vim-7.1.155/src/ex_docmd.c Fri Oct 19 16:20:09 2007
19 --- src/ex_docmd.c Sat Nov 10 12:39:51 2007
24 /* go up one line, to overwrite the ":<CR>" line, so the
25 ! * output doensn't contain empty lines. */
26 msg_row = prev_msg_row;
27 if (prev_msg_row == Rows - 1)
32 /* go up one line, to overwrite the ":<CR>" line, so the
33 ! * output doesn't contain empty lines. */
34 msg_row = prev_msg_row;
35 if (prev_msg_row == Rows - 1)
41 * Isolate the command and search for it in the command table.
43 * - the 'k' command can directly be followed by any character.
44 * - the 's' command can be followed directly by 'c', 'g', 'i', 'I' or 'r'
45 * but :sre[wind] is another command, as are :scrip[tnames],
49 * Isolate the command and search for it in the command table.
51 * - the 'k' command can directly be followed by any character.
52 * - the 's' command can be followed directly by 'c', 'g', 'i', 'I' or 'r'
53 * but :sre[wind] is another command, as are :scrip[tnames],
56 * The list should be allocated using alloc(), as should each item in the
57 * list. This function takes over responsibility for freeing the list.
59 ! * XXX The list is made into the arggument list. This is freed using
60 * FreeWild(), which does a series of vim_free() calls, unless the two defines
61 * __EMX__ and __ALWAYS_HAS_TRAILING_NUL_POINTER are set. In this case, a
62 * routine _fnexplodefree() is used. This may cause problems, but as the drop
64 * The list should be allocated using alloc(), as should each item in the
65 * list. This function takes over responsibility for freeing the list.
67 ! * XXX The list is made into the argument list. This is freed using
68 * FreeWild(), which does a series of vim_free() calls, unless the two defines
69 * __EMX__ and __ALWAYS_HAS_TRAILING_NUL_POINTER are set. In this case, a
70 * routine _fnexplodefree() is used. This may cause problems, but as the drop
73 if (vim_strchr(p_cpo, CPO_CHDIR) != NULL && curbufIsChanged()
76 ! EMSG(_("E747: Cannot change directory, buffer is modifed (add ! to override)"));
81 if (vim_strchr(p_cpo, CPO_CHDIR) != NULL && curbufIsChanged()
84 ! EMSG(_("E747: Cannot change directory, buffer is modified (add ! to override)"));
90 if (src > srcstart && src[-1] == '\\')
93 ! STRCPY(src - 1, src); /* remove backslash */
98 if (src > srcstart && src[-1] == '\\')
101 ! mch_memmove(src - 1, src, STRLEN(src) + 1); /* remove backslash */
105 *** ../vim-7.1.155/src/version.c Sat Nov 10 22:50:20 2007
106 --- src/version.c Sun Nov 11 19:15:51 2007
110 { /* Add new patch number below this line */
116 Common sense is what tells you that the world is flat.
118 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
119 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
120 \\\ download, build and distribute -- http://www.A-A-P.org ///
121 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///