From 464de3b03c50e9780164e5c29289ef4d644b79bc Mon Sep 17 00:00:00 2001 From: Kees Monshouwer Date: Mon, 13 Apr 2015 13:53:55 +0200 Subject: [PATCH] lower number of allowed compression loops in getLabelFromContent() 1000 is a bit high for a max 255 character qname --- pdns/dnsparser.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/dnsparser.cc b/pdns/dnsparser.cc index f6fc71156..880d37f0a 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; -- 2.40.0