To: vim-dev@vim.org Subject: Patch 6.2.264 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.264 (after 6.2.247) Problem: Writing past allocated memory when using a command line from the viminfo file. Solution: Store the NUL in the right place. Files: src/ex_getln.c *** ../vim-6.2.263/src/ex_getln.c Mon Feb 9 10:33:13 2004 --- src/ex_getln.c Tue Feb 17 11:02:24 2004 *************** *** 4771,4777 **** /* Not a search entry: No separator in the viminfo file, * add a NUL separator. */ mch_memmove(val, val + 1, (size_t)len); ! val[len + 1] = NUL; } viminfo_history[type][viminfo_hisidx[type]++] = val; } --- 4810,4816 ---- /* Not a search entry: No separator in the viminfo file, * add a NUL separator. */ mch_memmove(val, val + 1, (size_t)len); ! val[len] = NUL; } viminfo_history[type][viminfo_hisidx[type]++] = val; } *** ../vim-6.2.263/src/version.c Sun Feb 15 13:49:38 2004 --- src/version.c Tue Feb 17 20:21:17 2004 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 264, /**/ -- "Hit any key to continue" is a lie. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///