]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
fuzz: better init for protocol detection
authorPhilippe Antoine <pantoine@oisf.net>
Tue, 29 Oct 2024 21:26:37 +0000 (22:26 +0100)
committerVictor Julien <victor@inliniac.net>
Sat, 7 Dec 2024 09:23:46 +0000 (10:23 +0100)
Ticket: 7435

src/tests/fuzz/fuzz_applayerprotodetectgetproto.c

index e30f729bc28f852a47d8ae3acc48c32119c6bcca..6dcaf179346114556dfbf6fe0f9a97f9ea99e00e 100644 (file)
@@ -9,7 +9,7 @@
 #include "suricata.h"
 #include "app-layer-detect-proto.h"
 #include "flow-util.h"
-#include "app-layer-parser.h"
+#include "app-layer.h"
 #include "util-unittest-helper.h"
 #include "conf-yaml-loader.h"
 
@@ -43,9 +43,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
         MpmTableSetup();
         SpmTableSetup();
         EngineModeSetIDS();
-        AppLayerProtoDetectSetup();
-        AppLayerParserSetup();
-        AppLayerParserRegisterProtocolParsers();
+        AppLayerSetup();
         alpd_tctx = AppLayerProtoDetectGetCtxThread();
         SC_ATOMIC_SET(engine_stage, SURICATA_RUNTIME);
     }