diff --git a/CHANGES b/CHANGES index 46e4bcdca5..db8a6d56ca 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +4831. [bug] Convert the RRSIG expirytime to 64 bits for + comparisions in diff.c:resign. [RT #46710] + 4830. [bug] Failure to configure ATF when requested did not cause an error in top-level configure script. [RT #46655] diff --git a/lib/dns/diff.c b/lib/dns/diff.c index ef3ad4f38a..0dad091523 100644 --- a/lib/dns/diff.c +++ b/lib/dns/diff.c @@ -30,6 +30,7 @@ #include #include #include +#include #define CHECK(op) \ do { result = (op); \ @@ -195,7 +196,7 @@ static isc_stdtime_t setresign(dns_rdataset_t *modified) { dns_rdata_t rdata = DNS_RDATA_INIT; dns_rdata_rrsig_t sig; - isc_stdtime_t when; + isc_int64_t when; isc_result_t result; result = dns_rdataset_first(modified); @@ -205,7 +206,7 @@ setresign(dns_rdataset_t *modified) { if ((rdata.flags & DNS_RDATA_OFFLINE) != 0) when = 0; else - when = sig.timeexpire; + when = dns_time64_from32(sig.timeexpire); dns_rdata_reset(&rdata); result = dns_rdataset_next(modified); @@ -215,14 +216,14 @@ setresign(dns_rdataset_t *modified) { if ((rdata.flags & DNS_RDATA_OFFLINE) != 0) { goto next_rr; } - if (when == 0 || sig.timeexpire < when) - when = sig.timeexpire; + if (when == 0 || dns_time64_from32(sig.timeexpire) < when) + when = dns_time64_from32(sig.timeexpire); next_rr: dns_rdata_reset(&rdata); result = dns_rdataset_next(modified); } INSIST(result == ISC_R_NOMORE); - return (when); + return ((isc_stdtime_t)when); } static void