This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[ob] fix buf size in amd64_epilogue_frame_cache
- From: Michael Snyder <msnyder at vmware dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Sun, 20 Dec 2009 11:08:30 -0800
- Subject: [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;