Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,7 @@ if BUILD_FUZZTARGETS
LDFLAGS_FUZZ = $(all_libraries) $(SECLDFLAGS)
LDADD_FUZZ = $(LDADD_GENERIC)

fuzz_applayerprotodetectgetproto_SOURCES = tests/fuzz/fuzz_applayerprotodetectgetproto.c
fuzz_applayerprotodetectgetproto_SOURCES = tests/fuzz/fuzz_applayerprotodetectgetproto.c tests/fuzz/confyaml.c
fuzz_applayerprotodetectgetproto_LDFLAGS = $(LDFLAGS_FUZZ)
fuzz_applayerprotodetectgetproto_LDADD = $(LDADD_FUZZ)
fuzz_applayerprotodetectgetproto_DEPENDENCIES = libsuricata_c.a $(RUST_SURICATA_LIB)
Expand All @@ -1290,7 +1290,7 @@ endif
# force usage of CXX for linker
nodist_EXTRA_fuzz_applayerprotodetectgetproto_SOURCES = force-cxx-linking.cxx

fuzz_applayerparserparse_SOURCES = tests/fuzz/fuzz_applayerparserparse.c
fuzz_applayerparserparse_SOURCES = tests/fuzz/fuzz_applayerparserparse.c tests/fuzz/confyaml.c
fuzz_applayerparserparse_LDFLAGS = $(LDFLAGS_FUZZ)
fuzz_applayerparserparse_LDADD = $(LDADD_FUZZ)
fuzz_applayerparserparse_DEPENDENCIES = libsuricata_c.a $(RUST_SURICATA_LIB)
Expand Down Expand Up @@ -1338,7 +1338,7 @@ endif
# force usage of CXX for linker
nodist_EXTRA_fuzz_decodepcapfile_SOURCES = force-cxx-linking.cxx

fuzz_sigpcap_SOURCES = tests/fuzz/fuzz_sigpcap.c
fuzz_sigpcap_SOURCES = tests/fuzz/fuzz_sigpcap.c tests/fuzz/confyaml.c
fuzz_sigpcap_LDFLAGS = $(LDFLAGS_FUZZ)
fuzz_sigpcap_LDADD = $(LDADD_FUZZ)
fuzz_sigpcap_DEPENDENCIES = libsuricata_c.a $(RUST_SURICATA_LIB)
Expand All @@ -1351,7 +1351,7 @@ endif
nodist_EXTRA_fuzz_sigpcap_SOURCES = force-cxx-linking.cxx

if HAS_FUZZPCAP
fuzz_sigpcap_aware_SOURCES = tests/fuzz/fuzz_sigpcap_aware.c
fuzz_sigpcap_aware_SOURCES = tests/fuzz/fuzz_sigpcap_aware.c tests/fuzz/confyaml.c
fuzz_sigpcap_aware_LDFLAGS = $(LDFLAGS_FUZZ)
fuzz_sigpcap_aware_LDADD = $(LDADD_FUZZ) -lfuzzpcap
fuzz_sigpcap_aware_DEPENDENCIES = libsuricata_c.a $(RUST_SURICATA_LIB)
Expand All @@ -1363,7 +1363,7 @@ endif
# force usage of CXX for linker
nodist_EXTRA_fuzz_sigpcap_aware_SOURCES = force-cxx-linking.cxx

fuzz_predefpcap_aware_SOURCES = tests/fuzz/fuzz_predefpcap_aware.c
fuzz_predefpcap_aware_SOURCES = tests/fuzz/fuzz_predefpcap_aware.c tests/fuzz/confyaml.c
fuzz_predefpcap_aware_LDFLAGS = $(LDFLAGS_FUZZ)
fuzz_predefpcap_aware_LDADD = $(LDADD_FUZZ) -lfuzzpcap
fuzz_predefpcap_aware_DEPENDENCIES = libsuricata_c.a $(RUST_SURICATA_LIB)
Expand Down
2 changes: 1 addition & 1 deletion src/tests/fuzz/confyaml.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const char configNoChecksum[] = "\
const char *configNoChecksum = "\
%YAML 1.1\n\
---\n\
pcap-file:\n\
Expand Down
2 changes: 1 addition & 1 deletion src/tests/fuzz/fuzz_applayerparserparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ int LLVMFuzzerInitialize(int *argc, char ***argv);

AppLayerParserThreadCtx *alp_tctx = NULL;

#include "confyaml.c"
extern const char *configNoChecksum;

/* input buffer is structured this way :
* 6 bytes header,
Expand Down
2 changes: 1 addition & 1 deletion src/tests/fuzz/fuzz_applayerprotodetectgetproto.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
//rule of thumb constant, so as not to timeout target
#define PROTO_DETECT_MAX_LEN 1024

#include "confyaml.c"
extern const char *configNoChecksum;

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);

Expand Down
2 changes: 1 addition & 1 deletion src/tests/fuzz/fuzz_predefpcap_aware.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void *fwd;
SCInstance surifuzz;
SC_ATOMIC_EXTERN(unsigned int, engine_stage);

#include "confyaml.c"
extern const char *configNoChecksum;

char *filepath = NULL;

Expand Down
2 changes: 1 addition & 1 deletion src/tests/fuzz/fuzz_sigpcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void *fwd;
SCInstance surifuzz;
SC_ATOMIC_EXTERN(unsigned int, engine_stage);

#include "confyaml.c"
extern const char *configNoChecksum;

int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
{
Expand Down
2 changes: 1 addition & 1 deletion src/tests/fuzz/fuzz_sigpcap_aware.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void *fwd;
SCInstance surifuzz;
SC_ATOMIC_EXTERN(unsigned int, engine_stage);

#include "confyaml.c"
extern const char *configNoChecksum;

static void SigGenerateAware(const uint8_t *data, size_t size, char *r, size_t *len)
{
Expand Down