]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
lower number of allowed compression loops in getLabelFromContent() 2424/head
authorKees Monshouwer <mind04@monshouwer.org>
Mon, 13 Apr 2015 11:53:55 +0000 (13:53 +0200)
committermind04 <mind04@monshouwer.org>
Mon, 13 Apr 2015 11:54:10 +0000 (13:54 +0200)
1000 is a bit high for a max 255 character qname

pdns/dnsparser.cc

index f6fc711566928d0f32f330b3a6a29e8756b9be9d..880d37f0a1532413efa69ba89c761482a0e60c22 100644 (file)
@@ -459,7 +459,7 @@ string PacketReader::getText(bool multi)
 
 void PacketReader::getLabelFromContent(const vector<uint8_t>& content, uint16_t& frompos, string& ret, int recurs) 
 {
-  if(recurs > 1000) // the forward reference-check below should make this test 100% obsolete
+  if(recurs > 100) // the forward reference-check below should make this test 100% obsolete
     throw MOADNSException("Loop");
   // it is tempting to call reserve on ret, but it turns out it creates a malloc/free storm in the loop
   int pos = frompos;