From eedc2a0729623caafb469890b1db0886d03d4ff8 Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Thu, 14 Oct 2004 17:10:18 +0000 Subject: a more reasonable limit for the stackgap_random; found by openbsd@hunger.hu --- sys/kern/kern_sysctl.c | 4 ++-- 1 file 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); -- cgit v1.2.3