From e1ded36332dc36afaf6df24dcacfd5bee851f6df Mon Sep 17 00:00:00 2001 From: Max Moroz Date: Wed, 21 Nov 2018 12:31:39 -0800 Subject: [PATCH] [libxml2] Use seed corpus from libxml2/test for all fuzz targets + xml.dict. --- projects/libxml2/build.sh | 8 ++++++-- projects/libxml2/libxml2_xml_read_memory_fuzzer.options | 2 -- .../libxml2/libxml2_xml_regexp_compile_fuzzer.options | 2 -- 3 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 projects/libxml2/libxml2_xml_read_memory_fuzzer.options delete mode 100644 projects/libxml2/libxml2_xml_regexp_compile_fuzzer.options diff --git a/projects/libxml2/build.sh b/projects/libxml2/build.sh index da97cad6c..77260ac7d 100755 --- a/projects/libxml2/build.sh +++ b/projects/libxml2/build.sh @@ -21,10 +21,14 @@ make -j$(nproc) clean make -j$(nproc) all +seed_corpus_temp_file="$OUT/xml_seed_corpus.zip" +zip -r $seed_corpus_temp_file $SRC/libxml2/test + for fuzzer in libxml2_xml_read_memory_fuzzer libxml2_xml_reader_for_file_fuzzer libxml2_xml_regexp_compile_fuzzer; do $CXX $CXXFLAGS -std=c++11 -Iinclude/ \ $SRC/$fuzzer.cc -o $OUT/$fuzzer \ -lFuzzingEngine .libs/libxml2.a -done -cp $SRC/*.dict $SRC/*.options $OUT/ + cp $SRC/*.dict $OUT/$fuzzer.dict + cp $seed_corpus_temp_file $OUT/${fuzzer}_seed_corpus.zip +done diff --git a/projects/libxml2/libxml2_xml_read_memory_fuzzer.options b/projects/libxml2/libxml2_xml_read_memory_fuzzer.options deleted file mode 100644 index 6335e163b..000000000 --- a/projects/libxml2/libxml2_xml_read_memory_fuzzer.options +++ /dev/null @@ -1,2 +0,0 @@ -[libfuzzer] -dict = xml.dict diff --git a/projects/libxml2/libxml2_xml_regexp_compile_fuzzer.options b/projects/libxml2/libxml2_xml_regexp_compile_fuzzer.options deleted file mode 100644 index 6335e163b..000000000 --- a/projects/libxml2/libxml2_xml_regexp_compile_fuzzer.options +++ /dev/null @@ -1,2 +0,0 @@ -[libfuzzer] -dict = xml.dict