From: Remi Gacogne Date: Wed, 29 May 2019 08:03:36 +0000 (+0200) Subject: auth: Check that we could get the zone info in LMDBBackend::replaceRRSet() X-Git-Tag: dnsdist-1.4.0-beta1~8^2~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=72f6d4c471131cad31638356dc642698f7c49c2d;p=pdns auth: Check that we could get the zone info in LMDBBackend::replaceRRSet() Reported by Coverity (CID 1401628). --- diff --git a/modules/lmdbbackend/lmdbbackend.cc b/modules/lmdbbackend/lmdbbackend.cc index 8f2d0925d..165dcf01e 100644 --- a/modules/lmdbbackend/lmdbbackend.cc +++ b/modules/lmdbbackend/lmdbbackend.cc @@ -397,8 +397,10 @@ bool LMDBBackend::replaceRRSet(uint32_t domain_id, const DNSName& qname, const Q } DomainInfo di; - d_tdomains->getROTransaction().get(domain_id, di); // XX error checking - + if (!d_tdomains->getROTransaction().get(domain_id, di)) { + return false; + } + compoundOrdername co; auto cursor = txn->txn.getCursor(txn->db->dbi); MDBOutVal key, val;