Message ID | 20200813064923.263565-15-laurent@vivier.eu |
---|---|
State | New |
Headers | show |
Series | Linux user for 5.2 patches | expand |
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 10dd53bf999b..96ae942909ab 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -11922,8 +11922,13 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, if (!arg3) { tsp = NULL; } else { - target_to_host_timespec(ts, arg3); - target_to_host_timespec(ts+1, arg3+sizeof(struct target_timespec)); + if (target_to_host_timespec(ts, arg3)) { + return -TARGET_EFAULT; + } + if (target_to_host_timespec(ts + 1, arg3 + + sizeof(struct target_timespec))) { + return -TARGET_EFAULT; + } tsp = ts; } if (!arg2)