From: Nicholas N. <nj...@ca...> - 2003-06-10 13:48:12
|
On Tue, 10 Jun 2003, Leonard mckinley wrote: > 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. You're right, it's now fixed (I think/hope) in CVS. Thanks for the report. N |