]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Limit the maximum length of a qname 2561/head
authorPieter Lexis <pieter.lexis@powerdns.com>
Tue, 2 Jun 2015 13:26:42 +0000 (15:26 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Tue, 2 Jun 2015 13:26:42 +0000 (15:26 +0200)
pdns/dnsparser.cc

index a1e21bc8246e5de9a8ef4065337527764c1fa8dd..c844f86327debfa3dc00668bf814b70f1c78aef2 100644 (file)
@@ -494,6 +494,8 @@ void PacketReader::getLabelFromContent(const vector<uint8_t>& content, uint16_t&
       }
       ret.append(1,'.');
     }
+    if (ret.length() > 1024)
+      throw MOADNSException("Total name too long");
   }
 }