mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 18:48:20 +00:00
Add error and abort if fuzzer requested is not found
This commit is contained in:
parent
f33fc95bcc
commit
bc31e4872c
1 changed files with 6 additions and 0 deletions
|
@ -40,6 +40,12 @@ static zeek::analyzer::Analyzer* add_analyzer(zeek::Connection* conn)
|
|||
auto* tcp = new zeek::packet_analysis::TCP::TCPSessionAdapter(conn);
|
||||
auto* pia = new zeek::analyzer::pia::PIA_TCP(conn);
|
||||
auto a = zeek::analyzer_mgr->InstantiateAnalyzer(TOSTRING(ZEEK_FUZZ_ANALYZER), conn);
|
||||
if ( ! a )
|
||||
{
|
||||
fprintf(stderr, "Unknown or unsupported analyzer %s found\n", TOSTRING(ZEEK_FUZZ_ANALYZER));
|
||||
abort();
|
||||
}
|
||||
|
||||
tcp->AddChildAnalyzer(a);
|
||||
tcp->AddChildAnalyzer(pia->AsAnalyzer());
|
||||
conn->SetSessionAdapter(tcp, pia);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue