mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 21:05:08 +00:00
The POSIX spec also requires that kern_sigtimedwait return
EINVAL if tv_nsec of the timeout is less than zero.
This commit is contained in:
parent
80366b6d6a
commit
a6ca48085c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=117972
|
@ -911,7 +911,7 @@ kern_sigtimedwait(struct thread *td, sigset_t waitset, siginfo_t *info,
|
|||
if (timeout) {
|
||||
struct timeval tv;
|
||||
|
||||
if (timeout->tv_nsec > 1000000000) {
|
||||
if (timeout->tv_nsec < 0 || timeout->tv_nsec > 1000000000) {
|
||||
error = EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue