To: vim-dev@vim.org Subject: patch 7.1.076 Fcc: outbox From: Bram Moolenaar 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 *** ../vim-7.1.075/src/ex_docmd.c Sat Aug 11 15:59:44 2007 --- src/ex_docmd.c Wed Aug 8 22:28:33 2007 *************** *** 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; } *** ../vim-7.1.075/src/normal.c Wed Aug 8 21:41:19 2007 --- src/normal.c Sun Aug 12 17:35:20 2007 *************** *** 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()) *** ../vim-7.1.075/src/version.c Tue Aug 14 22:40:13 2007 --- src/version.c Tue Aug 14 22:53:13 2007 *************** *** 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 ///