]>
Commit | Line | Data |
---|---|---|
0a7814d6 AG |
1 | To: vim-dev@vim.org |
2 | Subject: patch 7.1.076 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=ISO-8859-1 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 7.1.076 | |
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 | |
14 | ||
15 | ||
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 | |
18 | *************** | |
19 | *** 4493,4499 **** | |
20 | if (eap->argt & (USECTRLV | XFILE)) | |
21 | ++p; /* skip CTRL-V and next char */ | |
22 | else | |
23 | ! STRCPY(p, p + 1); /* remove CTRL-V and skip next char */ | |
24 | if (*p == NUL) /* stop at NUL after CTRL-V */ | |
25 | break; | |
26 | } | |
27 | --- 4493,4500 ---- | |
28 | if (eap->argt & (USECTRLV | XFILE)) | |
29 | ++p; /* skip CTRL-V and next char */ | |
30 | else | |
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 */ | |
34 | break; | |
35 | } | |
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 | |
38 | *************** | |
39 | *** 3760,3766 **** | |
40 | extra_len = (int)STRLEN(p); | |
41 | overflow = old_len + extra_len - SHOWCMD_COLS; | |
42 | if (overflow > 0) | |
43 | ! STRCPY(showcmd_buf, showcmd_buf + overflow); | |
44 | STRCAT(showcmd_buf, p); | |
45 | ||
46 | if (char_avail()) | |
47 | --- 3760,3767 ---- | |
48 | extra_len = (int)STRLEN(p); | |
49 | overflow = old_len + extra_len - SHOWCMD_COLS; | |
50 | if (overflow > 0) | |
51 | ! mch_memmove(showcmd_buf, showcmd_buf + overflow, | |
52 | ! old_len - overflow + 1); | |
53 | STRCAT(showcmd_buf, p); | |
54 | ||
55 | if (char_avail()) | |
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 | |
58 | *************** | |
59 | *** 668,669 **** | |
60 | --- 668,671 ---- | |
61 | { /* Add new patch number below this line */ | |
62 | + /**/ | |
63 | + 76, | |
64 | /**/ | |
65 | ||
66 | -- | |
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. | |
70 | ||
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 /// |