Skip to content

Commit

Permalink
Merge pull request #3272 from pieterlexis/3.4-zone2sql-crash-on-broke…
Browse files Browse the repository at this point in the history
…n-soa

ZoneParser: Throw PDNSException on too many SOA data elements
  • Loading branch information
Habbie committed Feb 2, 2016
2 parents 5b06f55 + 428ac83 commit 0821425
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pdns/zoneparser-tng.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 0821425

Please sign in to comment.