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/aix-thread.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gdb/aix-thread.c') 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