From ce1b0e505e812cca9e1d3fd82cf9f1372b4f29d3 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 9 Jun 2000 06:01:37 +0000 Subject: [PATCH] INSIST() on sane time from the kernel. --- lib/isc/unix/stdtime.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/isc/unix/stdtime.c b/lib/isc/unix/stdtime.c index a5c687180e..3bd5da138b 100644 --- a/lib/isc/unix/stdtime.c +++ b/lib/isc/unix/stdtime.c @@ -35,5 +35,7 @@ isc_stdtime_get(isc_stdtime_t *t) { RUNTIME_CHECK(gettimeofday(&tv, NULL) != -1); + INSIST(tv.tv_usec >= 0 && tv.tv_usec < 1000000); + *t = (unsigned int)tv.tv_sec; }