From 0c306c7c1f2218b262171c7de7eb2d02e102ab66 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Wed, 20 Jan 2016 15:28:32 +0100 Subject: [PATCH] ZoneParser: Throw PDNSException on too many SOA data elements --- pdns/zoneparser-tng.cc | 2 ++ 1 file changed, 2 insertions(+) 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(); -- 2.40.0