From: Otto Moerbeek Date: Tue, 15 Jul 2025 12:46:42 +0000 (+0200) Subject: Don't thow in slowParseEDNSOptions(), return false if arcount is zero X-Git-Tag: rec-5.4.0-alpha0~18^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10979e97cb2691570e6a16bc5a4b2943a4789816;p=thirdparty%2Fpdns.git Don't thow in slowParseEDNSOptions(), return false if arcount is zero Signed-off-by: Otto Moerbeek --- diff --git a/pdns/ednsoptions.cc b/pdns/ednsoptions.cc index 2d0377b8a7..9398ecd0f5 100644 --- a/pdns/ednsoptions.cc +++ b/pdns/ednsoptions.cc @@ -107,7 +107,7 @@ bool slowParseEDNSOptions(const PacketBuffer& packet, EDNSOptionViewMap& options } if (ntohs(dnsHeader->arcount) == 0) { - throw std::runtime_error("slowParseEDNSOptions() should not be called for queries that have no EDNS"); + return false; } try {