diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-08-02 16:11:12 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-08-02 16:11:12 +0000 |
commit | b0e6567fb529f695856bcc0d3526100ee6f1c5a0 (patch) | |
tree | 1b479f4a5bd8bda5d6cbb5b7e87cefa489c74aa3 /sys/arch | |
parent | a408a8552e051923f5d58590f9babd6375099c5f (diff) |
In hpux_sys_getcontext(), check for len <= 0 and return EINVAL.
Noted by Silvio Cesare
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/hp300/hp300/hpux_machdep.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/hp300/hp300/hpux_machdep.c b/sys/arch/hp300/hp300/hpux_machdep.c index 5e149e4f318..0ff3b6a102d 100644 --- a/sys/arch/hp300/hp300/hpux_machdep.c +++ b/sys/arch/hp300/hp300/hpux_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hpux_machdep.c,v 1.13 2002/07/20 19:24:55 art Exp $ */ +/* $OpenBSD: hpux_machdep.c,v 1.14 2002/08/02 16:11:11 millert Exp $ */ /* $NetBSD: hpux_machdep.c,v 1.19 1998/02/16 20:58:30 thorpej Exp $ */ /* @@ -241,6 +241,9 @@ hpux_sys_getcontext(p, v, retval) int l, i, error = 0; int len; + if (SCARG(uap, len) <= 0) + return (EINVAL); + for (i = 0; context_table[i].str != NULL; i++) if (context_table[i].val == fputype) break; |