diff --git a/projects/cel-cpp/Dockerfile b/projects/cel-cpp/Dockerfile index 6c4b67eef..9ed7c9496 100644 --- a/projects/cel-cpp/Dockerfile +++ b/projects/cel-cpp/Dockerfile @@ -23,5 +23,5 @@ COPY BUILD fuzz*.cc $SRC/cel-cpp/fuzz/ COPY WORKSPACE .bazelrc $SRC/ RUN cat WORKSPACE >> $SRC/cel-cpp/WORKSPACE RUN cat .bazelrc >> $SRC/cel-cpp/.bazelrc -RUN echo "4.0.0" > $SRC/cel-cpp/.bazelversion +RUN echo "4.1.0" > $SRC/cel-cpp/.bazelversion WORKDIR $SRC/cel-cpp diff --git a/projects/cel-cpp/fuzz_parse.cc b/projects/cel-cpp/fuzz_parse.cc index f4755d319..8aaba0bba 100644 --- a/projects/cel-cpp/fuzz_parse.cc +++ b/projects/cel-cpp/fuzz_parse.cc @@ -16,14 +16,17 @@ #include +#include "parser/options.h" #include "parser/parser.h" #define MAX_RECURSION 0x100 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { std::string str (reinterpret_cast(data), size); + google::api::expr::parser::ParserOptions options; + options.max_recursion_depth = MAX_RECURSION; try { - auto parse_status = google::api::expr::parser::Parse(str, "fuzzinput", MAX_RECURSION); + auto parse_status = google::api::expr::parser::Parse(str, "fuzzinput", options); if (!parse_status.ok()) { parse_status.status().message(); }