| To: vim-dev@vim.org |
| Subject: patch 7.1.076 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.1.076 |
| Problem: Another strcpy() with overlapping arguments. |
| Solution: Use mch_memmove(). (Dominique Pelle) And another one. |
| Files: src/ex_docmd.c, src/normal.c |
| |
| |
| |
| |
| |
| *** 4493,4499 **** |
| if (eap->argt & (USECTRLV | XFILE)) |
| ++p; /* skip CTRL-V and next char */ |
| else |
| ! STRCPY(p, p + 1); /* remove CTRL-V and skip next char */ |
| if (*p == NUL) /* stop at NUL after CTRL-V */ |
| break; |
| } |
| --- 4493,4500 ---- |
| if (eap->argt & (USECTRLV | XFILE)) |
| ++p; /* skip CTRL-V and next char */ |
| else |
| ! /* remove CTRL-V and skip next char */ |
| ! mch_memmove(p, p + 1, STRLEN(p)); |
| if (*p == NUL) /* stop at NUL after CTRL-V */ |
| break; |
| } |
| |
| |
| |
| *** 3760,3766 **** |
| extra_len = (int)STRLEN(p); |
| overflow = old_len + extra_len - SHOWCMD_COLS; |
| if (overflow > 0) |
| ! STRCPY(showcmd_buf, showcmd_buf + overflow); |
| STRCAT(showcmd_buf, p); |
| |
| if (char_avail()) |
| --- 3760,3767 ---- |
| extra_len = (int)STRLEN(p); |
| overflow = old_len + extra_len - SHOWCMD_COLS; |
| if (overflow > 0) |
| ! mch_memmove(showcmd_buf, showcmd_buf + overflow, |
| ! old_len - overflow + 1); |
| STRCAT(showcmd_buf, p); |
| |
| if (char_avail()) |
| |
| |
| |
| *** 668,669 **** |
| --- 668,671 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 76, |
| /**/ |
| |
| -- |
| hundred-and-one symptoms of being an internet addict: |
| 161. You get up before the sun rises to check your e-mail, and you |
| find yourself in the very same chair long after the sun has set. |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ download, build and distribute -- http://www.A-A-P.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |