From: Remi Gacogne Date: Tue, 3 Nov 2015 15:14:06 +0000 (+0100) Subject: Check NSEC3PARAMRecordContent pointer before dereferencing it. X-Git-Tag: dnsdist-1.0.0-alpha1~249^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=83ff9428dbaedbcb3b93c513501f54eb3ce5cc21;p=pdns Check NSEC3PARAMRecordContent pointer before dereferencing it. Bind2Backend::getNSEC3PARAM() does not seem to be called with a NULL NSEC3PARAMRecordContent pointer, but better safe than sorry. --- 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<