summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2004-10-14 17:10:18 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2004-10-14 17:10:18 +0000
commiteedc2a0729623caafb469890b1db0886d03d4ff8 (patch)
tree57a5e859d144588c940368aae4ad95ebfc7bbd6e
parentdcb7fd15067bca57816eeb07867a8a2281a3f4b5 (diff)
a more reasonable limit for the stackgap_random; found by openbsd@hunger.hu
-rw-r--r--sys/kern/kern_sysctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index 6c8be59d622..8daac01f67a 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sysctl.c,v 1.120 2004/09/23 21:08:54 deraadt Exp $ */
+/* $OpenBSD: kern_sysctl.c,v 1.121 2004/10/14 17:10:17 mickey Exp $ */
/* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */
/*-
@@ -483,7 +483,7 @@ kern_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
* Safety harness.
*/
if ((stackgap < ALIGNBYTES && stackgap != 0) ||
- !powerof2(stackgap) || stackgap >= 256 * 1024 * 1024)
+ !powerof2(stackgap) || stackgap >= MAXSSIZ)
return (EINVAL);
stackgap_random = stackgap;
return (0);