diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2008-03-31 22:12:38 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2008-03-31 22:12:38 +0000 |
commit | 7faf843fd0787907444c2fc9c599095ca4b016a0 (patch) | |
tree | fcda46261fa8fc2072bed1fa9742f1b005b73206 /sys/lib/libsa | |
parent | f7ffe2a99c6cbddd32ff76a51be32ce9f01c515b (diff) |
Correctly load ZMAGIC a.out binaries.
Diffstat (limited to 'sys/lib/libsa')
-rw-r--r-- | sys/lib/libsa/loadfile.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/lib/libsa/loadfile.c b/sys/lib/libsa/loadfile.c index 19aa630cb31..96563c3dced 100644 --- a/sys/lib/libsa/loadfile.c +++ b/sys/lib/libsa/loadfile.c @@ -1,5 +1,5 @@ /* $NetBSD: loadfile.c,v 1.10 2000/12/03 02:53:04 tsutsui Exp $ */ -/* $OpenBSD: loadfile.c,v 1.16 2008/03/31 19:58:10 miod Exp $ */ +/* $OpenBSD: loadfile.c,v 1.17 2008/03/31 22:12:37 miod Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -311,8 +311,10 @@ aout_exec(int fd, struct exec *x, u_long *marks, int flags) else { if (flags & LOAD_HDR) BCOPY(x, maxp, sizeof(*x)); - if (flags & (LOAD_HDR|COUNT_HDR)) + if (flags & (LOAD_HDR|COUNT_HDR)) { + minp += sizeof(*x); maxp += sizeof(*x); + } } /* |