DNS-fuzzer: raise new_connection event

The conn protocol scripts now assume that new_connection is run before
connection_state_remove. Update the DNS analyzer to raise the
new_connection event.
This commit is contained in:
Johanna Amann 2025-07-29 18:28:27 +01:00
parent 83d5243cf6
commit 5e74eefd88

View file

@ -48,6 +48,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
auto conn = add_connection(); auto conn = add_connection();
auto a = add_analyzer(conn); auto a = add_analyzer(conn);
// The conn protocol scripts assume that new_connection is run before connection_state_remove.
if ( new_connection )
conn->Event(new_connection, nullptr);
try { try {
a->DeliverPacket(size, data, true, -1, nullptr, size); a->DeliverPacket(size, data, true, -1, nullptr, size);
} catch ( const binpac::Exception& e ) { } catch ( const binpac::Exception& e ) {