Commit 03aa19762854bc4749fea52d7f2ba7d1077c036f

Authored by ths
1 parent e96e2044

Fix for execve syscall, by Kirill A. Shutemov.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3763 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 4 additions and 4 deletions
linux-user/syscall.c
... ... @@ -3187,18 +3187,18 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
3187 3187 argc = 0;
3188 3188 guest_argp = arg2;
3189 3189 for (gp = guest_argp; ; gp++) {
3190   - if (get_user_ual(guest_argp, gp))
  3190 + if (get_user_ual(addr, gp))
3191 3191 goto efault;
3192   - if (!guest_argp)
  3192 + if (!addr)
3193 3193 break;
3194 3194 argc++;
3195 3195 }
3196 3196 envc = 0;
3197 3197 guest_envp = arg3;
3198 3198 for (gp = guest_envp; ; gp++) {
3199   - if (get_user_ual(guest_envp, gp))
  3199 + if (get_user_ual(addr, gp))
3200 3200 goto efault;
3201   - if (!guest_envp)
  3201 + if (!addr)
3202 3202 break;
3203 3203 envc++;
3204 3204 }
... ...