fuzz: remove decodeder fuzz target

As we removed decodeder function
pull/4732/head
Philippe Antoine 6 years ago
parent e15f3db474
commit 440bb4d600

@ -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)\" \

@ -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;
}
Loading…
Cancel
Save