From: Kees Monshouwer Date: Mon, 13 Apr 2015 11:53:55 +0000 (+0200) Subject: lower number of allowed compression loops in getLabelFromContent() X-Git-Tag: rec-3.7.2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3ec3e0fc71bc89ac41c7e6d8cd3f323f25233881;p=pdns lower number of allowed compression loops in getLabelFromContent() 1000 is a bit high for a max 255 character qname --- diff --git a/pdns/dnsparser.cc b/pdns/dnsparser.cc index 2f9ae5158..98fdd467f 100644 --- a/pdns/dnsparser.cc +++ b/pdns/dnsparser.cc @@ -455,7 +455,7 @@ string PacketReader::getText(bool multi) void PacketReader::getLabelFromContent(const vector& 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;