Permalink
Browse files

lower number of allowed compression loops in getLabelFromContent()

1000 is a bit high for a max 255 character qname
  • Loading branch information...
1 parent adb10be commit 3ec3e0fc71bc89ac41c7e6d8cd3f323f25233881 @mind04 mind04 committed with Habbie Apr 13, 2015
Showing with 1 addition and 1 deletion.
  1. +1 −1 pdns/dnsparser.cc
View
@@ -455,7 +455,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;

0 comments on commit 3ec3e0f

Please sign in to comment.