From: Remi Gacogne Date: Tue, 1 Aug 2023 08:55:16 +0000 (+0200) Subject: dnsdist: Add a comment indicating we are fine with at() throwing X-Git-Tag: rec-5.0.0-alpha1~78^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92d022ed697ce85c33cd6396cfe6a780a9de786a;p=thirdparty%2Fpdns.git dnsdist: Add a comment indicating we are fine with at() throwing --- diff --git a/pdns/dnsdist-lua-rules.cc b/pdns/dnsdist-lua-rules.cc index 860231ad05..2495b4a9ee 100644 --- a/pdns/dnsdist-lua-rules.cc +++ b/pdns/dnsdist-lua-rules.cc @@ -262,6 +262,8 @@ static boost::optional getRuleFromSelector(const std::vector& rules, const } } else if (auto pos = boost::get(&selector)) { + /* this will throw a std::out_of_range exception if the + supplied position is out of bounds, this is fine */ return rules.at(*pos); } return boost::none;