From: bert hubert Date: Wed, 12 Jun 2013 12:22:21 +0000 (+0200) Subject: improve error message in illformated unknown record type, thanks Jelte for reporting X-Git-Tag: rec-3.6.0-rc1~672 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5aa7d67ded3115f7353186d4b59a8383de1cac7e;p=pdns improve error message in illformated unknown record type, thanks Jelte for reporting --- diff --git a/pdns/dnsparser.cc b/pdns/dnsparser.cc index 7eb5179e4..5a65f0b61 100644 --- a/pdns/dnsparser.cc +++ b/pdns/dnsparser.cc @@ -60,7 +60,7 @@ public: const string& relevant=(parts.size() > 2) ? parts[2] : ""; unsigned int total=atoi(parts[1].c_str()); if(relevant.size()!=2*total) - throw runtime_error("invalid unknown record"); + throw MOADNSException((boost::format("invalid unknown record length for label %s: size not equal to length field (%d != %d)") % d_dr.d_label.c_str() % relevant.size() % (2*total)).str()); string out; out.reserve(total+1); for(unsigned int n=0; n < total; ++n) {