diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 294779c86f..95d79ddc43 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -3025,7 +3025,7 @@ get_timeout: return -TARGET_EINVAL; } results = lock_user(VERIFY_WRITE, optval_addr, len, 1); - if (!results) { + if (!results && len > 0) { return -TARGET_EFAULT; } lv = len;