Fix number of auxargs entries to copy out for 32-bit Linuxulator.

PR:		228790
This commit is contained in:
Jung-uk Kim 2018-06-12 22:54:48 +00:00
parent fa986e33be
commit 6362b1a6b1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=335020

View File

@ -249,9 +249,10 @@ linux_fixup_elf(register_t **stack_base, struct image_params *imgp)
free(imgp->auxargs, M_TEMP);
imgp->auxargs = NULL;
KASSERT(pos - argarray <= AT_COUNT, ("Too many auxargs"));
KASSERT(pos - argarray <= LINUX_AT_COUNT, ("Too many auxargs"));
error = copyout(&argarray[0], auxbase, sizeof(*argarray) * AT_COUNT);
error = copyout(&argarray[0], auxbase,
sizeof(*argarray) * LINUX_AT_COUNT);
free(argarray, M_TEMP);
if (error != 0)
return (error);