From: Peter van Dijk Date: Wed, 11 Nov 2020 10:20:41 +0000 (+0100) Subject: rec-4.4: do not send overly long NOD lookups X-Git-Tag: rec-4.4.1~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9705%2Fhead;p=thirdparty%2Fpdns.git rec-4.4: do not send overly long NOD lookups --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index c4f5a8a460..ed1be7ff9d 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -1132,7 +1132,13 @@ static void sendNODLookup(const DNSName& dname) // Send a DNS A query to .g_nodLookupDomain static const QType qt(QType::A); static const uint16_t qc(QClass::IN); - DNSName qname = dname + g_nodLookupDomain; + DNSName qname; + try { + qname = dname + g_nodLookupDomain; + } + catch(const std::range_error &e) { + return; + } vector dummy; directResolve(qname, qt, qc, dummy); }