fuzz: fixes a leak in applayerparse target

If a protocol change was requested, the target did not handle
it as Suricata, as the target is meant to handle only one
app-layer protocol.
pull/6395/head
Philippe Antoine 4 years ago committed by Victor Julien
parent 72369fd8ce
commit ca054f7264

@ -148,6 +148,11 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
memcpy(isolatedBuffer, albuffer, alnext - albuffer);
(void) AppLayerParserParse(NULL, alp_tctx, f, f->alproto, flags, isolatedBuffer, alnext - albuffer);
free(isolatedBuffer);
if (FlowChangeProto(f)) {
// exits if a protocol change is requested
alsize = 0;
break;
}
flags &= ~(STREAM_START);
if (f->alparser &&
(((flags & STREAM_TOSERVER) != 0 &&

Loading…
Cancel
Save