diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-01-19 20:07:59 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-01-19 20:07:59 +0000 |
commit | 25279ab293bfb4d5478109f5de57a6d299dfb0a6 (patch) | |
tree | 13fffe855c91591de95f9be5610b2f38dcfa1614 | |
parent | bf1ca0466429f3fec0f0f2e2d7fc4b9dec2902bf (diff) |
Do not forget to adjust offsets for the beginning of the data area for non
OMAGIC binaries. Found the hard way by jsg@
-rw-r--r-- | usr.sbin/config/exec_aout.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/config/exec_aout.c b/usr.sbin/config/exec_aout.c index 42bc682741d..00409258092 100644 --- a/usr.sbin/config/exec_aout.c +++ b/usr.sbin/config/exec_aout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_aout.c,v 1.8 2003/09/26 17:00:27 deraadt Exp $ */ +/* $OpenBSD: exec_aout.c,v 1.9 2009/01/19 20:07:58 miod Exp $ */ /* * Copyright (c) 1999 Mats O Jansson. All rights reserved. @@ -25,7 +25,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: exec_aout.c,v 1.8 2003/09/26 17:00:27 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: exec_aout.c,v 1.9 2009/01/19 20:07:58 miod Exp $"; #endif #include <err.h> @@ -76,7 +76,7 @@ aout_adjust(caddr_t x) aout_computeadj(); if (aout_datashift != 0 && - (unsigned long)x >= N_DATADDR(aout_ex)) + (unsigned long)x >= N_DATADDR(aout_ex) - N_TXTADDR(aout_ex)) x -= aout_datashift; return (x + aout_adjvalue); |