This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sparc-tdep.c: __builtin___memcpy_chk overflows destination buffer


> You sent the diff as bas64 encoded MIME attachment which makes it
> difficult for me to review your diff.  Can you send it inline or as a
> normal 7-bit ASCII encoded attachments?

Here is the patch. I don't really understand what the problem is,
however, and I'm quite hesitant about this patch. I wasn't able to
reproduce the build failure, so couldn't investigate any further.


2009-09-17	Ralf Corsépius <ralf.corsepius@rtems.org>

	* sparc-tdep.c (sparc32_store_return_value): Use size_t as 
	return type of TYPE_LENGTH(type).


diff -Naur gdb-6.8.91.orig/gdb/sparc-tdep.c gdb-6.8.91/gdb/sparc-tdep.c
--- gdb-6.8.91.orig/gdb/sparc-tdep.c	2009-09-07 19:52:41.000000000 +0200
+++ gdb-6.8.91/gdb/sparc-tdep.c	2009-09-17 03:43:48.000000000 +0200
@@ -1100,7 +1100,7 @@
 sparc32_store_return_value (struct type *type, struct regcache *regcache,
 			    const gdb_byte *valbuf)
 {
-  int len = TYPE_LENGTH (type);
+  size_t len = TYPE_LENGTH (type);
   gdb_byte buf[8];
 
   gdb_assert (!sparc_structure_or_union_p (type));

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]