fuzz: use parsed rules in sigpcap target

Ticket: 4125

As commit d21a252238
But for sigpcap target as well
pull/6809/head
Philippe Antoine 4 years ago committed by Victor Julien
parent 529678d501
commit add1a0f561

@ -122,6 +122,15 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
if (DetectEngineReload(&surifuzz) < 0) {
return 0;
}
DetectEngineThreadCtx *old_det_ctx = FlowWorkerGetDetectCtxPtr(fwd);
DetectEngineCtx *de_ctx = DetectEngineGetCurrent();
de_ctx->ref_cnt--;
DetectEngineThreadCtx *new_det_ctx = DetectEngineThreadCtxInitForReload(&tv, de_ctx, 1);
FlowWorkerReplaceDetectCtx(fwd, new_det_ctx);
DetectEngineThreadCtxDeinit(NULL, old_det_ctx);
if (pos < size) {
//skip zero
pos++;

Loading…
Cancel
Save