From b5e56dc8c0fe5982ef40eb64d65eb22569b0b2a3 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Tue, 12 Mar 2024 12:41:28 +0100 Subject: [PATCH] rec: fix Coverity 1534473 Unintended sign extension --- pdns/validate.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/validate.cc b/pdns/validate.cc index 20b87d57e9..5726e3af9c 100644 --- a/pdns/validate.cc +++ b/pdns/validate.cc @@ -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; } /* -- 2.47.2