From: Remi Gacogne Date: Thu, 6 Oct 2022 08:11:55 +0000 (+0200) Subject: ednscookies: Fix another store_truncates_time_t coverity report X-Git-Tag: dnsdist-1.8.0-rc1~292^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F12067%2Fhead;p=thirdparty%2Fpdns.git ednscookies: Fix another store_truncates_time_t coverity report The truncation is due to DNS specific protocol properties. Fixes Coverity CID 380097. --- diff --git a/pdns/ednscookies.cc b/pdns/ednscookies.cc index 501f0b84f2..5e57f04a86 100644 --- a/pdns/ednscookies.cc +++ b/pdns/ednscookies.cc @@ -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(time(nullptr)); // RFC 9018 section 4.3: // The DNS server