]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
fuzz: remove decodeder fuzz target
authorPhilippe Antoine <contact@catenacyber.fr>
Thu, 26 Mar 2020 13:42:50 +0000 (14:42 +0100)
committerPhilippe Antoine <contact@catenacyber.fr>
Thu, 26 Mar 2020 13:42:50 +0000 (14:42 +0100)
As we removed decodeder function

src/Makefile.am
src/tests/fuzz/fuzz_decodeder.c [deleted file]

index 28cf620071ca04b708ff0a7b3b14468be4600d8e..8036c0a9b7af27138c6ef64bd77ae781e8f8ddd6 100755 (executable)
@@ -10,7 +10,7 @@ if BUILD_FUZZTARGETS
     bin_PROGRAMS += fuzz_applayerprotodetectgetproto \
     fuzz_applayerparserparse fuzz_siginit \
     fuzz_confyamlloadstring fuzz_decodepcapfile \
-    fuzz_sigpcap fuzz_mimedecparseline fuzz_decodeder
+    fuzz_sigpcap fuzz_mimedecparseline
 endif
 
 COMMON_SOURCES = \
@@ -642,19 +642,6 @@ fuzz_mimedecparseline_LINK=$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
     $(LIBTOOLFLAGS) --mode=link $(CXX) $(AM_CXXFLAGS) $(CXXFLAGS) \
     $(fuzz_mimedecparseline_LDFLAGS) $(LDFLAGS) -o $@
 
-nodist_fuzz_decodeder_SOURCES = tests/fuzz/fuzz_decodeder.c $(COMMON_SOURCES)
-fuzz_decodeder_LDFLAGS = $(all_libraries) ${SECLDFLAGS}
-fuzz_decodeder_LDADD = $(RUST_SURICATA_LIB) $(HTP_LDADD) $(RUST_LDADD)
-if HAS_FUZZLDFLAGS
-    fuzz_decodeder_LDFLAGS += $(LIB_FUZZING_ENGINE)
-else
-    nodist_fuzz_decodeder_SOURCES += tests/fuzz/onefile.c
-endif
-# force usage of CXX for linker
-fuzz_decodeder_LINK=$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
-    $(LIBTOOLFLAGS) --mode=link $(CXX) $(AM_CXXFLAGS) $(CXXFLAGS) \
-    $(fuzz_decodeder_LDFLAGS) $(LDFLAGS) -o $@
-
 # default CFLAGS
 AM_CFLAGS = ${OPTIMIZATION_CFLAGS} ${GCC_CFLAGS} ${CLANG_CFLAGS}            \
     ${SECCFLAGS} ${PCAP_CFLAGS} -DLOCAL_STATE_DIR=\"$(localstatedir)\"      \
diff --git a/src/tests/fuzz/fuzz_decodeder.c b/src/tests/fuzz/fuzz_decodeder.c
deleted file mode 100644 (file)
index 7fc4fb7..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * @file
- * @author Philippe Antoine <contact@catenacyber.fr>
- * fuzz target for DecodeDer
- */
-
-
-#include "suricata-common.h"
-#include "util-decode-der.h"
-
-int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
-
-static int initialized = 0;
-
-int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
-{
-    if (initialized == 0) {
-        //Redirects logs to /dev/null
-        setenv("SC_LOG_OP_IFACE", "file", 0);
-        setenv("SC_LOG_FILE", "/dev/null", 0);
-        //global init
-        InitGlobal();
-        run_mode = RUNMODE_UNITTEST;
-        initialized = 1;
-    }
-    uint32_t errcode = 0;
-
-    Asn1Generic *a = DecodeDer(data, size, &errcode);
-    DerFree(a);
-
-    return 0;
-}