diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2003-10-26 22:31:24 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2003-10-26 22:31:24 +0000 |
commit | 6504d21c450a5c38d48c6e890e500cffa27fb827 (patch) | |
tree | ea0665cf21ecc06b1cd8f7ff9e5af7232416f77a /sys/kern/kern_sysctl.c | |
parent | 66882baaaab594482c391178b1860923d95c8425 (diff) |
per deraadt@ request, don't permit insanely large stackgap values.
Diffstat (limited to 'sys/kern/kern_sysctl.c')
-rw-r--r-- | sys/kern/kern_sysctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 0dee4aaf506..0af58239e6f 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sysctl.c,v 1.90 2003/10/24 19:05:21 tedu Exp $ */ +/* $OpenBSD: kern_sysctl.c,v 1.91 2003/10/26 22:31:23 tedu Exp $ */ /* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */ /*- @@ -447,7 +447,7 @@ kern_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) * Safety harness. */ if ((stackgap < ALIGNBYTES && stackgap != 0) || - !powerof2(stackgap)) + !powerof2(stackgap) || stackgap >= 256 * 1024 * 1024) return (EINVAL); stackgap_random = stackgap; return (0); |