From: Bert Hubert Date: Sun, 24 Oct 2010 19:34:23 +0000 (+0000) Subject: silence an error message on very small packets - discovered by John J and Winfried A. X-Git-Tag: rec-3.3.1~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=45f5a69b4781f9b3c0e75639f5c3038c8b79b96b;p=pdns silence an error message on very small packets - discovered by John J and Winfried A. git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1729 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/dns.cc b/pdns/dns.cc index 98d52baa7..f930fac61 100644 --- a/pdns/dns.cc +++ b/pdns/dns.cc @@ -48,7 +48,7 @@ private: //! compares two dns packets, skipping the header, but including the question and the qtype bool dnspacketLessThan(const std::string& a, const std::string& b) { - if(a.length() < 12 || b.length() < 12) + if(a.length() <= 12 || b.length() <= 12) return a.length() < b.length(); // throw runtime_error("Error parsing question in dnspacket comparison: packet too short");