Dominique Pelle wrote:

> While using Vim-7.2.30 built with GUI GTK (huge), I stumbled
> upon this error with Valgrind memory checker:
> 
> ==13326== Source and destination overlap in memcpy(0x4B5D8D8, 0x4B5D8E4, 13)
> ==13326==    at 0x4024C92: memcpy (mc_replace_strmem.c:402)
> ==13326==    by 0x8102E99: LookupName (if_xcmdsrv.c:1021)
> ==13326==    by 0x810197E: DoRegisterName (if_xcmdsrv.c:303)
> ==13326==    by 0x8101718: serverRegisterName (if_xcmdsrv.c:225)
> ==13326==    by 0x81076D1: prepare_server (main.c:3379)
> ==13326==    by 0x8104253: main (main.c:721)
> 
> Attached patch fixes it by calling mch_memmove() instead of memcpy().
> Looking at the code, I found another place where the same problem would
> also happen (also fixed in patch).

Some versions of memcpy() can handle overlaps, but I suppose it's not
guaranteed.  Thanks for another patch.

-- 
hundred-and-one symptoms of being an internet addict:
204. You're being audited because you mailed your tax return to the IRC.

 /// 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
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui