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
This commit is contained in:
parent
9b3d9f0645
commit
fe18a7c9f2
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user