|
From: Leonard m. <spa...@ya...> - 2003-06-10 12:41:27
|
I extracted a valgrind-flagged problem into this simple little C
program:
#include <string.h>
int main()
{
char buffer[ 1024 ];
char name [ 64 ];
strcpy( buffer, "[" );
strcpy( name, "why did the chicken cross the road" );
strcat( name, buffer );
}
valgrind CVS says:
==3194== Source and destination overlap in strcat(0xbfffede0,
0xbfffee20)
==3194== at 0x40022FD4: strcat (mc_replace_strmem.c:59)
==3194== by 0x8048412: main (tst.C:10)
==3194== by 0x4031D4A1: __libc_start_main (in /lib/libc.so.6)
==3194== by 0x8048320: (within /home/rhh/tst)
Hmmm... Either I need more coffee this morning (a distinct
possibility), or this could be a valgrind bug.
Randall
__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
|