diff options
author | Michael Snyder <msnyder@vmware.com> | 2011-03-01 02:16:56 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2011-03-01 02:16:56 +0000 |
commit | f63fbe86f6082f0e860e3a33e71a7efe6683219d (patch) | |
tree | 3e4fe5d7565b18ea40e97c0ccf4b889708910b0c /gdb | |
parent | 9e91a352064f48e0b806096988e03f6f4ebd35a0 (diff) | |
download | gdb-f63fbe86f6082f0e860e3a33e71a7efe6683219d.zip gdb-f63fbe86f6082f0e860e3a33e71a7efe6683219d.tar.gz gdb-f63fbe86f6082f0e860e3a33e71a7efe6683219d.tar.bz2 |
2011-02-28 Michael Snyder <msnyder@vmware.com>
* breakpoint.c (breakpoint_adjustment_warning): Make local char
buffers a little bigger, to avoid possibility of an overflow.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 3 | ||||
-rw-r--r-- | gdb/breakpoint.c | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 557f89f..8fcf424 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 2011-02-28 Michael Snyder <msnyder@vmware.com> + * breakpoint.c (breakpoint_adjustment_warning): Make local char + buffers a little bigger, to avoid possibility of an overflow. + * coffread.c (coff_getfilename): Add check to avoid overflow. * objc-lang.c (selectors_info): Add a small safety margin to diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index bb9927c..3fb8aab 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -5504,8 +5504,10 @@ static void breakpoint_adjustment_warning (CORE_ADDR from_addr, CORE_ADDR to_addr, int bnum, int have_bnum) { - char astr1[40]; - char astr2[40]; + /* The longest string possibly returned by hex_string_custom + is 50 chars. These must be at least that big for safety. */ + char astr1[64]; + char astr2[64]; strcpy (astr1, hex_string_custom ((unsigned long) from_addr, 8)); strcpy (astr2, hex_string_custom ((unsigned long) to_addr, 8)); |