From e3ebf1bb4166d27e70d049033773740cbd05b5d1 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Tue, 13 Mar 2012 22:27:12 +0000 Subject: Fix buffer overflow in aix-thread.c:fill_fprs gdb/ 2012-03-08 Chris January * aix-thread.c (fill_sprs): Store the floating point registers at the correct offsets into vals. --- gdb/ChangeLog | 5 +++++ gdb/aix-thread.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'gdb') 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 + + * aix-thread.c (fill_sprs): Store the floating point registers + at the correct offsets into vals. + 2012-03-13 Doug Evans * 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 -- cgit v1.1