]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
ZoneParser: Throw PDNSException on too many SOA data elements 3272/head
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:35:55 +0000 (15:35 +0100)
Closes #3270

pdns/zoneparser-tng.cc

index 4dd41b69e60c883baceaa7acb865f3b7c846ea6b..500f628d03dab8c16f34c7442fa0126840735f73 100644 (file)
@@ -428,6 +428,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+" contains too many parts");
     if(recparts.size() > 1) {
       recparts[0]=toCanonic(d_zonename, recparts[0]);
       recparts[1]=toCanonic(d_zonename, recparts[1]);