aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-user/syscall.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index e969d1b61d..5b7b8e2394 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6505,7 +6505,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
unsigned long zero = arg2 - ret;
p = alloca(zero);
memset(p, 0, zero);
- if (copy_to_user(arg3 + zero, p, zero)) {
+ if (copy_to_user(arg3 + ret, p, zero)) {
goto efault;
}
arg2 = ret;