From: Pieter Lexis Date: Tue, 2 Jun 2015 13:26:42 +0000 (+0200) Subject: Limit the maximum length of a qname X-Git-Tag: rec-3.7.3~1^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=92f7b2bb3f1e18a1f99b482347072dc8e46a2b40;p=pdns Limit the maximum length of a qname --- diff --git a/pdns/dnsparser.cc b/pdns/dnsparser.cc index 5610c8337..999a0025d 100644 --- a/pdns/dnsparser.cc +++ b/pdns/dnsparser.cc @@ -493,6 +493,8 @@ void PacketReader::getLabelFromContent(const vector& content, uint16_t& } ret.append(1,'.'); } + if (ret.length() > 1024) + throw MOADNSException("Total name too long"); } }