mirror of
https://github.com/xemu-project/xemu.git
synced 2025-02-03 18:53:12 +00:00
linux-user/syscall: Fix missing target_to_host_timespec64() check
Coverity pointed out (CID 1432339) that target_to_host_timespec64() can fail with -TARGET_EFAULT but we never check the return value. This patch checks the return value and handles the error. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <cad74fae734d2562746b94acd9c34b00081c89bf.1604432881.git.alistair.francis@wdc.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
36d2dbc72d
commit
e4ce178b61
@ -7592,7 +7592,9 @@ static int do_futex_time64(target_ulong uaddr, int op, int val, target_ulong tim
|
||||
case FUTEX_WAIT_BITSET:
|
||||
if (timeout) {
|
||||
pts = &ts;
|
||||
target_to_host_timespec64(pts, timeout);
|
||||
if (target_to_host_timespec64(pts, timeout)) {
|
||||
return -TARGET_EFAULT;
|
||||
}
|
||||
} else {
|
||||
pts = NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user