mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 11:08:20 +00:00
Trick event handlers into returning that they exist during fuzzing
This commit is contained in:
parent
0b8615942d
commit
7f47fa24fd
4 changed files with 28 additions and 10 deletions
|
@ -4,6 +4,7 @@
|
|||
#include <cstdlib>
|
||||
|
||||
#include "zeek/Event.h"
|
||||
#include "zeek/EventRegistry.h"
|
||||
#include "zeek/broker/Manager.h"
|
||||
#include "zeek/file_analysis/Manager.h"
|
||||
#include "zeek/session/Manager.h"
|
||||
|
@ -41,6 +42,11 @@ extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv)
|
|||
if ( zeek::detail::setup(*argc, *argv, &options).code )
|
||||
abort();
|
||||
|
||||
// We have to trick the event handlers into returning true that they exist here
|
||||
// even if they don't, because otherwise we lose a bit of coverage where if
|
||||
// statements return false that would otherwise not.
|
||||
zeek::event_registry->ActivateAllHandlers();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue