mach: Make clock_nanosleep also check tv_sec

This commit is contained in:
Samuel Thibault 2025-01-07 01:24:21 +01:00
parent 7bc54f0965
commit fb1059d42a

View file

@ -68,6 +68,7 @@ __clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
struct timespec *rem)
{
if (clock_id != CLOCK_REALTIME
|| req->tv_sec < 0
|| !valid_nanoseconds (req->tv_nsec)
|| (flags != 0 && flags != TIMER_ABSTIME))
return EINVAL;