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: dnsdist-1.0.0-alpha1~248^2~98^2~13^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=464de3b03c50e9780164e5c29289ef4d644b79bc;p=thirdparty%2Fpdns.git 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 f6fc711566..880d37f0a1 100644 --- a/pdns/dnsparser.cc +++ b/pdns/dnsparser.cc @@ -459,7 +459,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;