From 92f7b2bb3f1e18a1f99b482347072dc8e46a2b40 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Tue, 2 Jun 2015 15:26:42 +0200 Subject: [PATCH] Limit the maximum length of a qname --- pdns/dnsparser.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pdns/dnsparser.cc b/pdns/dnsparser.cc index 5610c83374..999a0025d4 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"); } } -- 2.47.2