diff options
author | 2002-08-02 16:11:11 +0000 | |
---|---|---|
committer | 2002-08-02 16:11:11 +0000 | |
commit | 3c57f001bca76c0d077318e87b96d45e9837a020 (patch) | |
tree | cfcaf8165d98c79da3c3a1f73763a12997b47a41 | |
parent | note that .ssh/environment is only read when (diff) | |
download | wireguard-openbsd-3c57f001bca76c0d077318e87b96d45e9837a020.tar.xz wireguard-openbsd-3c57f001bca76c0d077318e87b96d45e9837a020.zip |
In hpux_sys_getcontext(), check for len <= 0 and return EINVAL.
Noted by Silvio Cesare
-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; |