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]

[ob] fix buf size in amd64_epilogue_frame_cache


Going to treat this one as obvious.  Wrong buf size can cause
overflow and crash under inauspicious circumstances.

2009-12-20  Michael Snyder  <msnyder@vmware.com>

	* amd64-tdep.c (amd64_epilogue_frame_cache): Fix buf size.

Index: amd64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/amd64-tdep.c,v
retrieving revision 1.66
diff -u -p -r1.66 amd64-tdep.c
--- amd64-tdep.c	5 Nov 2009 21:17:00 -0000	1.66
+++ amd64-tdep.c	20 Dec 2009 19:08:58 -0000
@@ -1928,7 +1928,7 @@ amd64_epilogue_frame_cache (struct frame
   struct gdbarch *gdbarch = get_frame_arch (this_frame);
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   struct amd64_frame_cache *cache;
-  gdb_byte buf[4];
+  gdb_byte buf[8];
 
   if (*this_cache)
     return *this_cache;

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