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

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