]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: fix Coverity 1534473 Unintended sign extension
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 12 Mar 2024 11:41:28 +0000 (12:41 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 13 Mar 2024 09:21:28 +0000 (10:21 +0100)
pdns/validate.cc

index 20b87d57e94d33a167c4a8513bb6252eff3a6b7c..5726e3af9cccbbf0b185a81be16d1472c09cc3f7 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 + 1 + (saltLength > 0 ? 1 : 0)) * maxLabels;
+  return (iterations + 1U + (saltLength > 0 ? 1U : 0U)) * maxLabels;
 }
 
 /*