To: vim-dev@vim.org Subject: Patch 7.1.159 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 7.1.159 Problem: strcpy() has overlapping arguments. Solution: Use mch_memmove() instead. (Dominique Pelle) Files: src/ex_cmds.c *** ../vim-7.1.158/src/ex_cmds.c Thu Nov 8 20:47:34 2007 --- src/ex_cmds.c Sun Nov 18 14:11:58 2007 *************** *** 4885,4891 **** ++line2; /* move the cursor to the new line, like Vi */ ++curwin->w_cursor.lnum; ! STRCPY(new_start, p1 + 1); /* copy the rest */ p1 = new_start - 1; } } --- 4885,4892 ---- ++line2; /* move the cursor to the new line, like Vi */ ++curwin->w_cursor.lnum; ! /* copy the rest */ ! mch_memmove(new_start, p1 + 1, STRLEN(p1 + 1) + 1); p1 = new_start - 1; } } *** ../vim-7.1.158/src/version.c Tue Nov 20 17:21:28 2007 --- src/version.c Tue Nov 20 18:01:45 2007 *************** *** 668,669 **** --- 668,671 ---- { /* Add new patch number below this line */ + /**/ + 159, /**/ -- hundred-and-one symptoms of being an internet addict: 125. You begin to wonder how often it REALLY is necessary to get up and shower or bathe. /// 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 ///