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.
This commit is contained in:
Joel Brobecker 2012-03-13 22:27:12 +00:00
parent 168997566e
commit e3ebf1bb41
2 changed files with 7 additions and 1 deletions

View File

@ -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.

View File

@ -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