From 9b5bbec3c26d4e794b6e1c3a69e70d4ccd9d76d0 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Fri, 6 Nov 2015 22:46:54 +0100 Subject: [PATCH] some further empty dnsname checks, although I'm not sure this should be necessary --- modules/bindbackend/bindbackend2.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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"<