Dominique Pelle wrote:
> Valgrind memory checker finds the following error in vim-7.1.156:
>
> ==6314== Source and destination overlap in strcpy(0x4B81DD0, 0x4B81DD1)
> ==6314== at 0x40245D2: strcpy (mc_replace_strmem.c:106)
> ==6314== by 0x80986CA: do_sub (ex_cmds.c:4888)
> ==6314== by 0x80A50EA: do_one_cmd (ex_docmd.c:2621)
> ==6314== by 0x80A293A: do_cmdline (ex_docmd.c:1099)
> ==6314== by 0x8128CA6: nv_colon (normal.c:5175)
> ==6314== by 0x812226A: normal_cmd (normal.c:1148)
> ==6314== by 0x80E5245: main_loop (main.c:1181)
> ==6314== by 0x80E4D95: main (main.c:940)
>
> I can reproduce it when using <CTRL-M> in the substituted string.
>
> For example:
>
> $ echo foo > test.txt
> $ valgrind ./vim -u NONE -U NONE -c '%s/^/^Ma' test.txt 2>vg.log
>
> (where ^M can be typed with <CTRL-V><CTRL-M>)
>
> I attach a simple patch.
>
> I am using vim on Linux, built without optimizations -O0.
I'll include the patch. Thanks!
--
hundred-and-one symptoms of being an internet addict:
107. When using your phone you forget that you don't have to use your
keyboard.
/// Bram Moolenaar -- [EMAIL PROTECTED] -- 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 ///
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---