[Mono-bugs] [Bug 69043][Wis] New - We are using strncpy on overlapping strings

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 2 Nov 2004 18:20:48 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by bmaurer@users.sf.net.

http://bugzilla.ximian.com/show_bug.cgi?id=69043

--- shadow/69043	2004-11-02 18:20:48.000000000 -0500
+++ shadow/69043.tmp.4258	2004-11-02 18:20:48.000000000 -0500
@@ -0,0 +1,35 @@
+Bug#: 69043
+Product: Mono: Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bmaurer@users.sf.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: We are using strncpy on overlapping strings
+
+valgrind yells at me for:
+
+==21825== Source and destination overlap in strncpy(0x34E0AA89, 0x34E0AA8A, 8)
+==21825==    at 0x3414B90C: strncpy (in
+/usr/lib/valgrind/vgpreload_addrcheck.so)
+==21825==    by 0x80F35AB: canonicalize_path (image.c:108)
+==21825==    by 0x80F4CEA: mono_image_open (image.c:894)
+==21825==    by 0x80ED5EA: do_mono_assembly_open (assembly.c:625)
+==21825==
+==21825== Source and destination overlap in strncpy(0x34E0B782, 0x34E0B783, 8)
+==21825==    at 0x3414B90C: strncpy (in
+/usr/lib/valgrind/vgpreload_addrcheck.so)
+==21825==    by 0x80F35AB: canonicalize_path (image.c:108)
+==21825==    by 0x80F4AF0: do_mono_image_open (image.c:816)
+==21825==    by 0x80F4D5C: mono_image_open (image.c:913)
+
+According to the strncpy manpage, the two strings can't be overlapping.