diff options
author | Helge Deller <deller@gmx.de> | 2022-07-17 18:21:53 +0200 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2022-07-25 10:42:11 +0200 |
commit | 6f200f51869ff0de7ea0343dd7104362e994b382 (patch) | |
tree | 23e7ca4ca4229c593ff2fa973cb521dad8744f53 /linux-user/syscall.c | |
parent | 499d8055379f5beb2ca155c668eca52b8a24321a (diff) |
linux-user: Use target abi_int type for pipefd[1] in pipe()
When writing back the fd[1] pipe file handle to emulated userspace
memory, use sizeof(abi_int) as offset insted of the hosts's int type.
There is no functional change in this patch.
Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <YtQ3Id6z8slpVr7r@p100>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r-- | linux-user/syscall.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 4f89184d05..b27a6552aa 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1615,7 +1615,7 @@ static abi_long do_pipe(CPUArchState *cpu_env, abi_ulong pipedes, } if (put_user_s32(host_pipe[0], pipedes) - || put_user_s32(host_pipe[1], pipedes + sizeof(host_pipe[0]))) + || put_user_s32(host_pipe[1], pipedes + sizeof(abi_int))) return -TARGET_EFAULT; return get_errno(ret); } |