linux-user: allocate heap memory for execve arguments
commitb936cb50aacf3cccf5d2363095c6547eb709583a
authorPrasad J Pandit <pjp@fedoraproject.org>
Tue, 7 Mar 2017 07:21:47 +0000 (7 12:51 +0530)
committerRiku Voipio <riku.voipio@linaro.org>
Mon, 29 May 2017 11:56:08 +0000 (29 14:56 +0300)
tree1ed3f3324999739613e0608b8c85ebb5ae61516b
parentc4e316cfb5e3f4b58d5d6fb6cb6c2279a5c3229a
linux-user: allocate heap memory for execve arguments

Arguments passed to execve(2) call from user program could
be large, allocating stack memory for them via alloca(3) call
would lead to bad behaviour. Use 'g_new0' to allocate memory
for such arguments.

Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user/syscall.c