From: Pieter Lexis Date: Tue, 2 Jun 2015 13:26:42 +0000 (+0200) Subject: Limit the maximum length of a qname X-Git-Tag: auth-3.4.5^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F2561%2Fhead;p=thirdparty%2Fpdns.git Limit the maximum length of a qname --- diff --git a/pdns/dnsparser.cc b/pdns/dnsparser.cc index a1e21bc824..c844f86327 100644 --- a/pdns/dnsparser.cc +++ b/pdns/dnsparser.cc @@ -494,6 +494,8 @@ void PacketReader::getLabelFromContent(const vector& content, uint16_t& } ret.append(1,'.'); } + if (ret.length() > 1024) + throw MOADNSException("Total name too long"); } }