fuzz: set engine stage for conf yaml target

Ticket: 6188

Allows allocations failures not to be fatal as in init
pull/14481/head
Philippe Antoine 11 months ago committed by Victor Julien
parent 50224f2ee5
commit 6882159692

@ -9,6 +9,8 @@
#include "conf-yaml-loader.h"
#include "nallocinc.c"
SC_ATOMIC_EXTERN(unsigned int, engine_stage);
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
static int initialized = 0;
@ -22,6 +24,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
//global init
InitGlobal();
SCRunmodeSet(RUNMODE_UNITTEST);
SC_ATOMIC_SET(engine_stage, SURICATA_RUNTIME);
nalloc_init(NULL);
// do not restrict nalloc
initialized = 1;

Loading…
Cancel
Save