]> granicus.if.org Git - pdns/commitdiff
auth: Check that we could get the zone info in LMDBBackend::replaceRRSet()
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 29 May 2019 08:03:36 +0000 (10:03 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 29 May 2019 08:03:36 +0000 (10:03 +0200)
Reported by Coverity (CID 1401628).

modules/lmdbbackend/lmdbbackend.cc

index 8f2d0925db41a93c4030f228f22f0fce6c158ef0..165dcf01e3c2b681b8c48f8378c247e5b141e838 100644 (file)
@@ -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;