diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-06-20 15:50:36 +0100 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2016-06-26 13:17:21 +0300 |
commit | 4debae6fa57443adf3b390397a069855ee4c4e4d (patch) | |
tree | a90609cd9f209d64912d9cb32eb744dcc97d8f8c /linux-user/syscall.c | |
parent | ba4537805da7023ae48cef0cdc06e6724156c596 (diff) | |
download | qemu-4debae6fa57443adf3b390397a069855ee4c4e4d.zip qemu-4debae6fa57443adf3b390397a069855ee4c4e4d.tar.gz qemu-4debae6fa57443adf3b390397a069855ee4c4e4d.tar.bz2 |
linux-user: Fix wrong type used for argument to rt_sigqueueinfo
The third argument to the rt_sigqueueinfo syscall is a pointer to
a siginfo_t, not a pointer to a sigset_t. Fix the error in the
arguments to lock_user(), which meant that we would not have
detected some faults that we should.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r-- | linux-user/syscall.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 5166ff9..8163ae8 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -7876,8 +7876,11 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, case TARGET_NR_rt_sigqueueinfo: { siginfo_t uinfo; - if (!(p = lock_user(VERIFY_READ, arg3, sizeof(target_sigset_t), 1))) + + p = lock_user(VERIFY_READ, arg3, sizeof(target_siginfo_t), 1); + if (!p) { goto efault; + } target_to_host_siginfo(&uinfo, p); unlock_user(p, arg1, 0); ret = get_errno(sys_rt_sigqueueinfo(arg1, arg2, &uinfo)); |