From: Pieter Lexis Date: Wed, 20 Jan 2016 14:28:32 +0000 (+0100) Subject: ZoneParser: Throw PDNSException on too many SOA data elements X-Git-Tag: dnsdist-1.0.0-alpha2~6^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c306c7c1f2218b262171c7de7eb2d02e102ab66;p=pdns ZoneParser: Throw PDNSException on too many SOA data elements --- diff --git a/pdns/zoneparser-tng.cc b/pdns/zoneparser-tng.cc index 569aef0db..51928f7db 100644 --- a/pdns/zoneparser-tng.cc +++ b/pdns/zoneparser-tng.cc @@ -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();