]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix the tv_nsec check in isc_stdtime_get()
authorOndřej Surý <ondrej@isc.org>
Wed, 25 Mar 2020 18:06:50 +0000 (19:06 +0100)
committerOndřej Surý <ondrej@isc.org>
Wed, 25 Mar 2020 18:06:50 +0000 (19:06 +0100)
lib/isc/unix/stdtime.c

index a68ad31b1750ea3405688caee5f1412b143fa209..80e9f255472a6e62a308da38c52477ba8be31239 100644 (file)
@@ -45,7 +45,7 @@ isc_stdtime_get(isc_stdtime_t *t) {
                                strbuf);
        }
 
-       REQUIRE(ts.tv_sec > 0 && ts.tv_nsec > 0 && ts.tv_nsec < NS_PER_S);
+       REQUIRE(ts.tv_sec > 0 && ts.tv_nsec >= 0 && ts.tv_nsec < NS_PER_S);
 
        *t = (unsigned int)ts.tv_sec;
 }