diff options
author | Michael Snyder <msnyder@vmware.com> | 2011-03-01 02:31:27 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2011-03-01 02:31:27 +0000 |
commit | ac50ab3b44a453aef7a0ee53890aded3b696bf31 (patch) | |
tree | f2c03a3c81fa359031ec21b833d87c745678a2d2 | |
parent | f63fbe86f6082f0e860e3a33e71a7efe6683219d (diff) | |
download | gdb-ac50ab3b44a453aef7a0ee53890aded3b696bf31.zip gdb-ac50ab3b44a453aef7a0ee53890aded3b696bf31.tar.gz gdb-ac50ab3b44a453aef7a0ee53890aded3b696bf31.tar.bz2 |
2011-02-28 Michael Snyder <msnyder@vmware.com>
* ui-out.c (ui_out_field_core_addr): Make local char buffer
a little bigger, to avoid possibility of an overflow.
-rw-r--r-- | gdb/ChangeLog | 3 | ||||
-rw-r--r-- | gdb/ui-out.c | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8fcf424..2507c90 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 2011-02-28 Michael Snyder <msnyder@vmware.com> + * ui-out.c (ui_out_field_core_addr): Make local char buffer + a little bigger, to avoid possibility of an overflow. + * breakpoint.c (breakpoint_adjustment_warning): Make local char buffers a little bigger, to avoid possibility of an overflow. diff --git a/gdb/ui-out.c b/gdb/ui-out.c index 72a34f8..2cd1a54 100644 --- a/gdb/ui-out.c +++ b/gdb/ui-out.c @@ -492,7 +492,9 @@ ui_out_field_core_addr (struct ui_out *uiout, struct gdbarch *gdbarch, CORE_ADDR address) { - char addstr[20]; + /* Maximum size string returned by hex_string_custom is 50 chars. + This buffer must be bigger than that, for safety. */ + char addstr[64]; int addr_bit = gdbarch_addr_bit (gdbarch); if (addr_bit < (sizeof (CORE_ADDR) * HOST_CHAR_BIT)) |