]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
ednscookies: Fix another store_truncates_time_t coverity report 12067/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 6 Oct 2022 08:11:55 +0000 (10:11 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 6 Oct 2022 08:11:55 +0000 (10:11 +0200)
The truncation is due to DNS specific protocol properties.

Fixes Coverity CID 380097.

pdns/ednscookies.cc

index 501f0b84f2b896cb6980cf08c8142b29bd85ca97..5e57f04a86181ff9ccb6a11f67a1139221075f7d 100644 (file)
@@ -87,6 +87,7 @@ bool EDNSCookiesOpt::isValid(const string& secret, const ComboAddress& source) c
   uint32_t ts;
   memcpy(&ts, &server[4], sizeof(ts));
   ts = ntohl(ts);
+  // coverity[store_truncates_time_t]
   uint32_t now = static_cast<uint32_t>(time(nullptr));
   // RFC 9018 section 4.3:
   //    The DNS server