From 83ff9428dbaedbcb3b93c513501f54eb3ce5cc21 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Tue, 3 Nov 2015 16:14:06 +0100 Subject: [PATCH] Check NSEC3PARAMRecordContent pointer before dereferencing it. Bind2Backend::getNSEC3PARAM() does not seem to be called with a NULL NSEC3PARAMRecordContent pointer, but better safe than sorry. --- modules/bindbackend/binddnssec.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/bindbackend/binddnssec.cc b/modules/bindbackend/binddnssec.cc index 30bc7f8cd..4066e39db 100644 --- a/modules/bindbackend/binddnssec.cc +++ b/modules/bindbackend/binddnssec.cc @@ -167,11 +167,13 @@ bool Bind2Backend::getNSEC3PARAM(const DNSName& name, NSEC3PARAMRecordContent* n NSEC3PARAMRecordContent* tmp=dynamic_cast(DNSRecordContent::mastermake(QType::NSEC3PARAM, 1, value)); *ns3p = *tmp; delete tmp; + + if (ns3p->d_iterations > maxNSEC3Iterations) { + ns3p->d_iterations = maxNSEC3Iterations; + L<d_iterations > maxNSEC3Iterations) { - ns3p->d_iterations = maxNSEC3Iterations; - L<