From: bert hubert Date: Fri, 23 Sep 2016 08:26:06 +0000 (+0200) Subject: when encountering bad zone data in backend, make sure we finish the get() so we leave... X-Git-Tag: dnsdist-1.1.0-beta2~122 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d42d2664daea458bf0fc20d596637de17e3e8f91;p=thirdparty%2Fpdns.git when encountering bad zone data in backend, make sure we finish the get() so we leave the backend in a consistent state. --- diff --git a/pdns/dnsbackend.cc b/pdns/dnsbackend.cc index dd8f7c6e32..7bd05aa430 100644 --- a/pdns/dnsbackend.cc +++ b/pdns/dnsbackend.cc @@ -295,8 +295,15 @@ bool DNSBackend::get(DNSZoneRecord& dzr) dzr.dr = DNSRecord(rr); } } - else - dzr.dr = DNSRecord(rr); + else { + try { + dzr.dr = DNSRecord(rr); + } + catch(...) { + while(this->get(rr)); + throw; + } + } return true; }