From a6bbb608f79efb80de9d4ffbb84727a23227285b Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Mon, 25 Jan 2021 21:33:24 +0100 Subject: [PATCH] fuzz: makes target sigpcap more reproducible By removing the temporary rules file if it existed before the first run --- src/tests/fuzz/fuzz_sigpcap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tests/fuzz/fuzz_sigpcap.c b/src/tests/fuzz/fuzz_sigpcap.c index ca13daa68d..4549d5bfa9 100644 --- a/src/tests/fuzz/fuzz_sigpcap.c +++ b/src/tests/fuzz/fuzz_sigpcap.c @@ -61,6 +61,8 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) if (ConfYamlLoadString(configNoChecksum, strlen(configNoChecksum)) != 0) { abort(); } + // do not load rules before reproducible DetectEngineReload + remove("/tmp/fuzz.rules"); surifuzz.sig_file = strdup("/tmp/fuzz.rules"); surifuzz.sig_file_exclusive = 1; //loads rules after init