]> granicus.if.org Git - pdns/commitdiff
ZoneParser: Throw PDNSException on too many SOA data elements
authorPieter Lexis <pieter.lexis@powerdns.com>
Wed, 20 Jan 2016 14:28:32 +0000 (15:28 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Wed, 20 Jan 2016 14:28:32 +0000 (15:28 +0100)
pdns/zoneparser-tng.cc

index 569aef0db468cff8a93143cf4f23abe643051bff..51928f7db4a0d3e8a7fe536ca777e8b3d584ae42 100644 (file)
@@ -433,6 +433,8 @@ bool ZoneParserTNG::get(DNSResourceRecord& rr, std::string* comment)
 
   case QType::SOA:
     stringtok(recparts, rr.content);
+    if(recparts.size() > 7)
+      throw PDNSException("SOA record contents for "+rr.qname.toString()+" contains too many parts");
     if(recparts.size() > 1) {
       recparts[0]=toCanonic(d_zonename, recparts[0]).toStringRootDot();
       recparts[1]=toCanonic(d_zonename, recparts[1]).toStringRootDot();