summaryrefslogtreecommitdiffstats
path: root/usr.bin/truss
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2014-09-10 13:07:01 +0000
committerandrew <andrew@FreeBSD.org>2014-09-10 13:07:01 +0000
commit924d84a44cab6e8006fe21ab8b497cb85bf1e4cc (patch)
tree4b49af90ef186084cf517cd067ffef5c8f30d74d /usr.bin/truss
parent5939c729a85666a85362aa2ec0d108b18d89ca50 (diff)
downloadFreeBSD-src-924d84a44cab6e8006fe21ab8b497cb85bf1e4cc.zip
FreeBSD-src-924d84a44cab6e8006fe21ab8b497cb85bf1e4cc.tar.gz
Stop accessing the saved stack pointer by looking past the end of the
array of registers. Submitted by: Michal Meloun <meloun at miracle.cz>
Diffstat (limited to 'usr.bin/truss')
-rw-r--r--usr.bin/truss/arm-fbsd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/truss/arm-fbsd.c b/usr.bin/truss/arm-fbsd.c
index b717619..a1759ab 100644
--- a/usr.bin/truss/arm-fbsd.c
+++ b/usr.bin/truss/arm-fbsd.c
@@ -201,7 +201,7 @@ arm_syscall_entry(struct trussinfo *trussinfo, int nargs)
*/
// XXX BAD constant used here
iorequest.piod_op = PIOD_READ_D;
- iorequest.piod_offs = (void *)(regs.r[_REG_SP] +
+ iorequest.piod_offs = (void *)(regs.r_sp +
4 * sizeof(uint32_t));
iorequest.piod_addr = &fsc->args[4];
iorequest.piod_len = (nargs - 4) * sizeof(fsc->args[0]);
OpenPOWER on IntegriCloud