Skip to content

Commit

Permalink
ext_proc filter fuzzer crashed when test cases contains regex config (#…
Browse files Browse the repository at this point in the history
…27301)

Envoy ext_proc filter fuzzer run crashed when test cases contains regex config.

Signed-off-by: Yanjun Xiang <yanjunxiang@google.com>
  • Loading branch information
yanjunxiang-google authored May 10, 2023
1 parent bedd2b6 commit fb0f337
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ DEFINE_PROTO_FUZZER(
input.config();
ExternalProcessing::FilterConfigSharedPtr config;

// Create regex engine which is used by regex matcher code.
Regex::EnginePtr regex_engine = std::make_shared<Regex::GoogleReEngine>();
Regex::EngineSingleton::clear();
Regex::EngineSingleton::initialize(regex_engine.get());

try {
config = std::make_shared<ExternalProcessing::FilterConfig>(
proto_config, std::chrono::milliseconds(200), 200, *stats_store.rootScope(),
Expand Down

0 comments on commit fb0f337

Please sign in to comment.