Fix buffer overflow in aix-thread.c:fill_fprs
authorJoel Brobecker <brobecker@gnat.com>
Tue, 13 Mar 2012 22:27:12 +0000 (22:27 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Tue, 13 Mar 2012 22:27:12 +0000 (22:27 +0000)
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.

gdb/ChangeLog
gdb/aix-thread.c

index c946296e67cb432f45884e459487495b28ab98a5..b5f0f3337a2a5fe3ec32c73e024862d8ee6e1323 100644 (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.
index 3cdab4852cc8c694860a8f772dd603699013df85..f9787e3ab7ae22714edb0d0a87280dca69e35a3c 100644 (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
This page took 0.030916 seconds and 4 git commands to generate.