round RLIMIT_STACK; problem spotted by jfw@jfwhome.funhousecom
authorderaadt <deraadt@openbsd.org>
Fri, 14 Feb 1997 16:39:23 +0000 (16:39 +0000)
committerderaadt <deraadt@openbsd.org>
Fri, 14 Feb 1997 16:39:23 +0000 (16:39 +0000)
sys/kern/exec_subr.c

index e881097..8a766be 100644 (file)
@@ -217,7 +217,7 @@ exec_setup_stack(p, epp)
 
        epp->ep_maxsaddr = USRSTACK - MAXSSIZ;
        epp->ep_minsaddr = USRSTACK;
-       epp->ep_ssize = p->p_rlimit[RLIMIT_STACK].rlim_cur;
+       epp->ep_ssize = round_page(p->p_rlimit[RLIMIT_STACK].rlim_cur);
 
        /*
         * set up commands for stack.  note that this takes *two*, one to