From: bert hubert Date: Fri, 6 Nov 2015 21:46:54 +0000 (+0100) Subject: some further empty dnsname checks, although I'm not sure this should be necessary X-Git-Tag: dnsdist-1.0.0-alpha1~239^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b5bbec3c26d4e794b6e1c3a69e70d4ccd9d76d0;p=pdns some further empty dnsname checks, although I'm not sure this should be necessary --- diff --git a/modules/bindbackend/bindbackend2.cc b/modules/bindbackend/bindbackend2.cc index e35896aed..a72067147 100644 --- a/modules/bindbackend/bindbackend2.cc +++ b/modules/bindbackend/bindbackend2.cc @@ -889,10 +889,17 @@ bool Bind2Backend::findBeforeAndAfterUnhashed(BB2DomainInfo& bbd, const DNSName& while(iter == records->end() || (qname.canonCompare(iter->qname)) || (!(iter->auth) && (!(iter->qtype == QType::NS))) || (!(iter->qtype))) iter--; - before=iter->qname.labelReverse().toString(" ",false); + if(iter->qname.empty()) + before.clear(); + else { + before=iter->qname.labelReverse().toString(" ",false); + } } else { - before=qname.labelReverse().toString(" ",false); + if(qname.empty()) + before.clear(); + else + before=qname.labelReverse().toString(" ",false); } //cerr<<"Now after"<