]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Explicit cast to do multiply in 64-bit 13894/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 13 Mar 2024 10:05:28 +0000 (11:05 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 13 Mar 2024 10:05:28 +0000 (11:05 +0100)
pdns/validate.cc

index 5726e3af9cccbbf0b185a81be16d1472c09cc3f7..33e6ecbd5729643c74e9662d1feb280133eac77d 100644 (file)
@@ -506,7 +506,7 @@ dState matchesNSEC(const DNSName& name, uint16_t qtype, const DNSName& nsecOwner
 
 [[nodiscard]] uint64_t getNSEC3DenialProofWorstCaseIterationsCount(uint8_t maxLabels, uint16_t iterations, size_t saltLength)
 {
-  return (iterations + 1U + (saltLength > 0 ? 1U : 0U)) * maxLabels;
+  return static_cast<uint64_t>((iterations + 1U + (saltLength > 0 ? 1U : 0U))) * maxLabels;
 }
 
 /*