From efeb4a317616b0437a26277945bd300eaffe96d7 Mon Sep 17 00:00:00 2001 From: Max Dymond Date: Sun, 27 Aug 2017 15:57:05 +0100 Subject: ossfuzz: moving towards the ideal integration - Start with the basic code from the ossfuzz project. - Rewrite fuzz corpora to be binary files full of Type-Length-Value data, and write a glue layer in the fuzzing function to convert corpora into CURL options. - Have supporting functions to generate corpora from existing tests - Integrate with Makefile.am --- tests/fuzz/Makefile.inc | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'tests/fuzz/Makefile.inc') diff --git a/tests/fuzz/Makefile.inc b/tests/fuzz/Makefile.inc index fb6cdb11a..4d475374b 100644 --- a/tests/fuzz/Makefile.inc +++ b/tests/fuzz/Makefile.inc @@ -1,19 +1,15 @@ -FUZZPROGS = http11 ftp imap pop3 httpupload http2 +FUZZPROGS = curl_fuzzer +FUZZLIBS = libstandaloneengine.a -http11_SOURCES = curl_fuzzer.c -http11_CPPFLAGS = $(AM_CPPFLAGS) +curl_fuzzer_SOURCES = curl_fuzzer.c +curl_fuzzer_CFLAGS = $(AM_CFLAGS) -ftp_SOURCES = curl_fuzzer.c -ftp_CPPFLAGS = -DFUZZER_FTP $(AM_CPPFLAGS) +libstandaloneengine_a_SOURCES = standalone_fuzz_target_runner.c +libstandaloneengine_a_CFLAGS = $(AM_CFLAGS) -imap_SOURCES = curl_fuzzer.c -imap_CPPFLAGS = -DFUZZER_IMAP $(AM_CPPFLAGS) +# Some more targets. +zip: + zip -q -r curl_fuzzer_seed_corpus.zip curl_fuzz_data -pop3_SOURCES = curl_fuzzer.c -pop3_CPPFLAGS = -DFUZZER_POP3 $(AM_CPPFLAGS) - -httpupload_SOURCES = curl_fuzzer.c -httpupload_CPPFLAGS = -DFUZZER_HTTP_UPLOAD $(AM_CPPFLAGS) - -http2_SOURCES = curl_fuzzer.c -http2_CPPFLAGS = -DFUZZER_HTTP2 $(AM_CPPFLAGS) +check: all + ./curl_fuzzer curl_fuzz_data/* \ No newline at end of file -- cgit v1.2.3