fuzz: target for applayer cleans transactions

Ticket: 4530

Otherwise, we timeout because we kept too many of them
as Suricata would not
pull/6911/head
Philippe Antoine 5 years ago committed by Victor Julien
parent a5d3a1f92c
commit b39554b11f

@ -117,6 +117,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
f->alproto = data[0]; f->alproto = data[0];
} }
FLOWLOCK_WRLOCK(f);
/* /*
* We want to fuzz multiple calls to AppLayerParserParse * We want to fuzz multiple calls to AppLayerParserParse
* because some parts of the code are only reached after * because some parts of the code are only reached after
@ -163,6 +164,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
alsize = 0; alsize = 0;
break; break;
} }
AppLayerParserTransactionsCleanup(f);
} }
alsize -= alnext - albuffer + 4; alsize -= alnext - albuffer + 4;
albuffer = alnext + 4; albuffer = alnext + 4;
@ -191,6 +194,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
free(isolatedBuffer); free(isolatedBuffer);
} }
FLOWLOCK_UNLOCK(f);
FlowFree(f); FlowFree(f);
return 0; return 0;

Loading…
Cancel
Save