diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-12-30 19:46:56 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-12-30 19:46:56 +0000 |
commit | 59186e41369608855681212e555f620400f125ca (patch) | |
tree | 68f8e875d2639dbfd9d7e9efa05d50a34482d829 /sys/compat/sunos/sunos_exec.c | |
parent | e4021e01bb99e4567a9194ab990184de4e823e19 (diff) |
Missing or incorrect header sizes bounds check; ``looks ok'' mickey@
Diffstat (limited to 'sys/compat/sunos/sunos_exec.c')
-rw-r--r-- | sys/compat/sunos/sunos_exec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/compat/sunos/sunos_exec.c b/sys/compat/sunos/sunos_exec.c index e6875583eb2..ac79176802c 100644 --- a/sys/compat/sunos/sunos_exec.c +++ b/sys/compat/sunos/sunos_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sunos_exec.c,v 1.17 2003/06/02 15:54:31 deraadt Exp $ */ +/* $OpenBSD: sunos_exec.c,v 1.18 2005/12/30 19:46:55 miod Exp $ */ /* $NetBSD: sunos_exec.c,v 1.11 1996/05/05 12:01:47 briggs Exp $ */ /* @@ -103,6 +103,9 @@ sunos_exec_aout_makecmds(p, epp) struct sunos_exec *sunmag = epp->ep_hdr; int error = ENOEXEC; + if (epp->ep_hdrvalid < sizeof(struct sunos_exec)) + return (ENOEXEC); + if(sunmag->a_machtype != SUNOS_M_NATIVE) return (ENOEXEC); |