From d5e7c91845de55d0a0f5cb1e757825a3efbc211a Mon Sep 17 00:00:00 2001 From: Axel Viala Date: Wed, 14 Sep 2022 15:23:05 +0200 Subject: [PATCH] getNSEC3PARAM callsite: Define to false by default out-param narrow. --- modules/bindbackend/bindbackend2.cc | 2 +- pdns/packethandler.cc | 2 +- pdns/pdnsutil.cc | 6 +++--- pdns/tcpreceiver.cc | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/bindbackend/bindbackend2.cc b/modules/bindbackend/bindbackend2.cc index 748636a7d5..902c9fa82c 100644 --- a/modules/bindbackend/bindbackend2.cc +++ b/modules/bindbackend/bindbackend2.cc @@ -491,7 +491,7 @@ void Bind2Backend::alsoNotifies(const DNSName& domain, set* ips) void Bind2Backend::parseZoneFile(BB2DomainInfo* bbd) { NSEC3PARAMRecordContent ns3pr; - bool nsec3zone; + bool nsec3zone = false; if (d_hybrid) { DNSSECKeeper dk; nsec3zone = dk.getNSEC3PARAM(bbd->d_name, &ns3pr); diff --git a/pdns/packethandler.cc b/pdns/packethandler.cc index 6ae3d081de..c63ec0b80d 100644 --- a/pdns/packethandler.cc +++ b/pdns/packethandler.cc @@ -789,7 +789,7 @@ void PacketHandler::emitNSEC3(std::unique_ptr& r, const NSEC3PARAMRec void PacketHandler::addNSECX(DNSPacket& p, std::unique_ptr& r, const DNSName& target, const DNSName& wildcard, int mode) { NSEC3PARAMRecordContent ns3rc; - bool narrow; + bool narrow = false; if(d_dk.getNSEC3PARAM(d_sd.qname, &ns3rc, &narrow)) { if (mode != 5) // no direct NSEC3 queries, rfc5155 7.2.8 addNSEC3(p, r, target, wildcard, ns3rc, narrow, mode); diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index 5f80ab26c4..e709e1c932 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -934,7 +934,7 @@ static int increaseSerial(const DNSName& zone, DNSSECKeeper &dk) if (sd.db->doesDNSSEC()) { NSEC3PARAMRecordContent ns3pr; - bool narrow; + bool narrow = false; bool haveNSEC3=dk.getNSEC3PARAM(zone, &ns3pr, &narrow); DNSName ordername; @@ -2027,7 +2027,7 @@ static bool showZone(DNSSECKeeper& dk, const DNSName& zone, bool exportDS = fals } NSEC3PARAMRecordContent ns3pr; - bool narrow; + bool narrow = false; bool haveNSEC3=dk.getNSEC3PARAM(zone, &ns3pr, &narrow); DNSSECKeeper::keyset_t keyset=dk.getKeys(zone); @@ -3383,7 +3383,7 @@ try DNSName zone(cmds.at(1)); DNSName record(cmds.at(2)); NSEC3PARAMRecordContent ns3pr; - bool narrow; + bool narrow = false; if(!dk.getNSEC3PARAM(zone, &ns3pr, &narrow)) { cerr<<"The '"<& q, int outsock) DNSSECKeeper dk((*packetHandler)->getBackend()); DNSSECKeeper::clearCaches(q->qdomain); - bool narrow; + bool narrow = false; securedZone = dk.isSecuredZone(q->qdomain); if(dk.getNSEC3PARAM(q->qdomain, nullptr, &narrow)) { if(narrow) { -- 2.47.2