diff options
author | 2008-03-31 22:12:37 +0000 | |
---|---|---|
committer | 2008-03-31 22:12:37 +0000 | |
commit | e65a75ec06947e05617bd7d26e741032f0230800 (patch) | |
tree | 263142b1ce3d48fbf605a56e889650573d4052d9 | |
parent | Compile libsa with -D_STANDALONE. (diff) | |
download | wireguard-openbsd-e65a75ec06947e05617bd7d26e741032f0230800.tar.xz wireguard-openbsd-e65a75ec06947e05617bd7d26e741032f0230800.zip |
Correctly load ZMAGIC a.out binaries.
-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); + } } /* |