|
From: <sv...@va...> - 2013-01-19 21:08:36
|
philippe 2013-01-19 21:08:27 +0000 (Sat, 19 Jan 2013)
New Revision: 13245
Log:
Fix buffer overrun due to copy paste from x86 to amd64.
Detected by Florian (using coverity tool).
Modified files:
trunk/coregrind/m_gdbserver/valgrind-low-amd64.c
Modified: trunk/coregrind/m_gdbserver/valgrind-low-amd64.c (+2 -2)
===================================================================
--- trunk/coregrind/m_gdbserver/valgrind-low-amd64.c 2013-01-19 13:22:54 +00:00 (rev 13244)
+++ trunk/coregrind/m_gdbserver/valgrind-low-amd64.c 2013-01-19 21:08:27 +00:00 (rev 13245)
@@ -209,13 +209,13 @@
case 31:
if (dir == valgrind_to_gdbserver) {
UChar fpreg80[10];
- convert_f64le_to_f80le ((UChar *)&amd64->guest_FPREG[regno-16],
+ convert_f64le_to_f80le ((UChar *)&amd64->guest_FPREG[regno-24],
fpreg80);
VG_(transfer) (&fpreg80, buf, dir, sizeof(fpreg80), mod);
} else {
ULong fpreg64;
convert_f80le_to_f64le (buf, (UChar *)&fpreg64);
- VG_(transfer) (&amd64->guest_FPREG[regno-16], &fpreg64,
+ VG_(transfer) (&amd64->guest_FPREG[regno-24], &fpreg64,
dir, sizeof(fpreg64), mod);
}
break;
|