]> granicus.if.org Git - pdns/commitdiff
Limit the maximum length of a qname
authorPieter Lexis <pieter.lexis@powerdns.com>
Tue, 2 Jun 2015 13:26:42 +0000 (15:26 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Mon, 8 Jun 2015 13:51:22 +0000 (15:51 +0200)
pdns/dnsparser.cc

index 5610c833747e2385aae2d7f69721ff27cc66f77b..999a0025d48b338e1473c258a808081bc8e03e1b 100644 (file)
@@ -493,6 +493,8 @@ void PacketReader::getLabelFromContent(const vector<uint8_t>& content, uint16_t&
       }
       ret.append(1,'.');
     }
+    if (ret.length() > 1024)
+      throw MOADNSException("Total name too long");
   }
 }