4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Another strcpy() with overlapping arguments.
12 Solution: Use mch_memmove(). (Dominique Pelle) And another one.
13 Files: src/ex_docmd.c, src/normal.c
16 *** ../vim-7.1.075/src/ex_docmd.c Sat Aug 11 15:59:44 2007
17 --- src/ex_docmd.c Wed Aug 8 22:28:33 2007
20 if (eap->argt & (USECTRLV | XFILE))
21 ++p; /* skip CTRL-V and next char */
23 ! STRCPY(p, p + 1); /* remove CTRL-V and skip next char */
24 if (*p == NUL) /* stop at NUL after CTRL-V */
28 if (eap->argt & (USECTRLV | XFILE))
29 ++p; /* skip CTRL-V and next char */
31 ! /* remove CTRL-V and skip next char */
32 ! mch_memmove(p, p + 1, STRLEN(p));
33 if (*p == NUL) /* stop at NUL after CTRL-V */
36 *** ../vim-7.1.075/src/normal.c Wed Aug 8 21:41:19 2007
37 --- src/normal.c Sun Aug 12 17:35:20 2007
40 extra_len = (int)STRLEN(p);
41 overflow = old_len + extra_len - SHOWCMD_COLS;
43 ! STRCPY(showcmd_buf, showcmd_buf + overflow);
44 STRCAT(showcmd_buf, p);
48 extra_len = (int)STRLEN(p);
49 overflow = old_len + extra_len - SHOWCMD_COLS;
51 ! mch_memmove(showcmd_buf, showcmd_buf + overflow,
52 ! old_len - overflow + 1);
53 STRCAT(showcmd_buf, p);
56 *** ../vim-7.1.075/src/version.c Tue Aug 14 22:40:13 2007
57 --- src/version.c Tue Aug 14 22:53:13 2007
61 { /* Add new patch number below this line */
67 hundred-and-one symptoms of being an internet addict:
68 161. You get up before the sun rises to check your e-mail, and you
69 find yourself in the very same chair long after the sun has set.
71 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
72 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
73 \\\ download, build and distribute -- http://www.A-A-P.org ///
74 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///