From: Peter van Dijk Date: Wed, 11 Nov 2020 10:20:41 +0000 (+0100) Subject: rec-4.3: do not send overly long NOD lookups X-Git-Tag: rec-4.3.6~2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9706%2Fhead;p=thirdparty%2Fpdns.git rec-4.3: do not send overly long NOD lookups --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index 82cb1d6cad..719185d443 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -1077,7 +1077,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); }