Hi,
Attached patch fixes another overlapping strcpy() problem
reported by valgrind:
==18012== Source and destination overlap in strcpy(0x81BE1A0, 0x81BE1A1)
==18012== at 0x4022CA2: strcpy (mc_replace_strmem.c:106)
==18012== by 0x8104B93: add_to_showcmd (normal.c:3763)
==18012== by 0x8100693: normal_cmd (normal.c:710)
==18012== by 0x80CD352: main_loop (main.c:1180)
==18012== by 0x80CCF66: main (main.c:939)
-- Dominique
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
Index: normal.c
===================================================================
RCS file: /cvsroot/vim/vim7/src/normal.c,v
retrieving revision 1.96
diff -c -r1.96 normal.c
*** normal.c 8 Aug 2007 19:41:39 -0000 1.96
--- normal.c 12 Aug 2007 14:12:02 -0000
***************
*** 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())