aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2012-03-13 22:27:12 +0000
committerJoel Brobecker <brobecker@gnat.com>2012-03-13 22:27:12 +0000
commite3ebf1bb4166d27e70d049033773740cbd05b5d1 (patch)
tree6c238b0bbb0cce8acc257ac0e78291141a6dc747 /gdb
parent168997566e2a9a7050bd9f236c4b6d9a2223864c (diff)
downloadgdb-e3ebf1bb4166d27e70d049033773740cbd05b5d1.zip
gdb-e3ebf1bb4166d27e70d049033773740cbd05b5d1.tar.gz
gdb-e3ebf1bb4166d27e70d049033773740cbd05b5d1.tar.bz2
Fix buffer overflow in aix-thread.c:fill_fprs
gdb/ 2012-03-08 Chris January <chris.january@allinea.com> * aix-thread.c (fill_sprs): Store the floating point registers at the correct offsets into vals.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/aix-thread.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c946296..b5f0f33 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2012-03-13 Chris January <chris.january@allinea.com>
+
+ * aix-thread.c (fill_sprs): Store the floating point registers
+ at the correct offsets into vals.
+
2012-03-13 Doug Evans <dje@google.com>
* NEWS: Mention symbol-reloading has been deleted.
diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c
index 3cdab48..f9787e3 100644
--- a/gdb/aix-thread.c
+++ b/gdb/aix-thread.c
@@ -1356,7 +1356,8 @@ fill_fprs (const struct regcache *regcache, double *vals)
regno < tdep->ppc_fp0_regnum + ppc_num_fprs;
regno++)
if (REG_VALID == regcache_register_status (regcache, regno))
- regcache_raw_collect (regcache, regno, vals + regno);
+ regcache_raw_collect (regcache, regno,
+ vals + regno - tdep->ppc_fp0_regnum);
}
/* Store the special registers into the specified 64-bit and 32-bit