diff options
author | kib <kib@FreeBSD.org> | 2015-04-23 11:27:21 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2015-04-23 11:27:21 +0000 |
commit | fe18a7c9f22dfdb0e0661d4d601442d819d6ffaa (patch) | |
tree | 7470da544385bd093eb8bd2dc590a88c1c61de18 /sys/kern/kern_exec.c | |
parent | 9b3d9f06458360940ee8f952f6f3bbdfda2b024d (diff) | |
download | FreeBSD-src-fe18a7c9f22dfdb0e0661d4d601442d819d6ffaa.zip FreeBSD-src-fe18a7c9f22dfdb0e0661d4d601442d819d6ffaa.tar.gz |
Handle incorrect ELF images specifying size for PT_GNU_STACK not being
multiple of page size.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r-- | sys/kern/kern_exec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index ecc2651..9d893f8 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1060,7 +1060,7 @@ exec_new_vmspace(imgp, sv) /* Allocate a new stack */ if (imgp->stack_sz != 0) { - ssiz = imgp->stack_sz; + ssiz = trunc_page(imgp->stack_sz); PROC_LOCK(p); lim_rlimit(p, RLIMIT_STACK, &rlim_stack); PROC_UNLOCK(p); |