Message ID | 20200728123432.501354-3-laurent@vivier.eu |
---|---|
State | New |
Headers | show |
Series | [PULL,1/3] linux-user: Ensure mmap_min_addr is non-zero | expand |
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index f5c4f6b95db4..c1ebf7b8f384 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -8868,7 +8868,9 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, unlock_user(p, arg1, 0); if (arg3) { puts = &uts; - target_to_host_timespec(puts, arg3); + if (target_to_host_timespec(puts, arg3)) { + return -TARGET_EFAULT; + } } else { puts = NULL; }