]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Add a comment indicating we are fine with at() throwing
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 1 Aug 2023 08:55:16 +0000 (10:55 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 1 Aug 2023 08:55:16 +0000 (10:55 +0200)
pdns/dnsdist-lua-rules.cc

index 860231ad05106f9712d652715a19d336dc2f0443..2495b4a9ee8e2cd259dfd9ce3a21d986abc9ef3a 100644 (file)
@@ -262,6 +262,8 @@ static boost::optional<T> getRuleFromSelector(const std::vector<T>& rules, const
     }
   }
   else if (auto pos = boost::get<int>(&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;