Trick event handlers into returning that they exist during fuzzing

This commit is contained in:
Tim Wojtulewicz 2022-08-03 16:40:56 -07:00
parent 0b8615942d
commit 7f47fa24fd
4 changed files with 28 additions and 10 deletions

View file

@ -136,4 +136,14 @@ void EventRegistry::SetErrorHandler(std::string_view name)
std::string(name).c_str());
}
void EventRegistry::ActivateAllHandlers()
{
auto event_names = AllHandlers();
for ( const auto& name : event_names )
{
if ( auto event = Lookup(name) )
event->SetGenerateAlways();
}
}
} // namespace zeek