In execve code for linux-user emulation, address increment steps seems to be 
wrong when counting argc/envc. 
/yoshii

Index: linux-user/syscall.c
===================================================================
RCS file: /sources/qemu/qemu/linux-user/syscall.c,v
retrieving revision 1.156
diff -u -p -r1.156 syscall.c
--- a/linux-user/syscall.c      9 Dec 2007 02:37:05 -0000       1.156
+++ b/linux-user/syscall.c      9 Dec 2007 20:44:05 -0000
@@ -3190,7 +3189,7 @@ abi_long do_syscall(void *cpu_env, int n
 
             argc = 0;
             guest_argp = arg2;
-            for (gp = guest_argp; ; gp++) {
+            for (gp = guest_argp; ; gp += sizeof(abi_ulong)) {
                 if (get_user_ual(addr, gp))
                     goto efault;
                 if (!addr)
@@ -3199,7 +3198,7 @@ abi_long do_syscall(void *cpu_env, int n
             }
             envc = 0;
             guest_envp = arg3;
-            for (gp = guest_envp; ; gp++) {
+            for (gp = guest_envp; ; gp += sizeof(abi_ulong)) {
                 if (get_user_ual(addr, gp))
                     goto efault;
                 if (!addr)


Reply via email to