summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordchagin <dchagin@FreeBSD.org>2017-04-15 15:31:28 +0000
committerdchagin <dchagin@FreeBSD.org>2017-04-15 15:31:28 +0000
commit164647d446bf17352e9f5bee7a69c1f3531a8054 (patch)
tree76afcab5fed32776bb18915484ba3b9a88cb4c43
parent8ebaceacc25e8a3a05fa301a71502a13b517b02b (diff)
downloadFreeBSD-src-164647d446bf17352e9f5bee7a69c1f3531a8054.zip
FreeBSD-src-164647d446bf17352e9f5bee7a69c1f3531a8054.tar.gz
MFC r316394:
The value in the tv_nsec field should be in the range 0 to 999999999.
-rw-r--r--sys/compat/linux/linux_time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/compat/linux/linux_time.c b/sys/compat/linux/linux_time.c
index dca960d..6f20b72 100644
--- a/sys/compat/linux/linux_time.c
+++ b/sys/compat/linux/linux_time.c
@@ -141,7 +141,7 @@ linux_to_native_timespec(struct timespec *ntp, struct l_timespec *ltp)
LIN_SDT_PROBE2(time, linux_to_native_timespec, entry, ntp, ltp);
- if (ltp->tv_sec < 0 || (l_ulong)ltp->tv_nsec > 999999999L) {
+ if (ltp->tv_sec < 0 || ltp->tv_nsec < 0 || ltp->tv_nsec > 999999999) {
LIN_SDT_PROBE1(time, linux_to_native_timespec, return, EINVAL);
return (EINVAL);
}
OpenPOWER on IntegriCloud