[libspng] add structure aware fuzzer (#2117)

This commit is contained in:
Randy 2019-01-28 18:23:20 +02:00 committed by Kostya Serebryany
parent d027fbc238
commit de864b54bf
2 changed files with 8 additions and 0 deletions

View File

@ -23,6 +23,7 @@ RUN apt-get update && \
apt-get install -y pkg-config zlib1g-dev
RUN git clone --depth 1 https://gitlab.com/randy408/libspng.git
RUN git clone --depth 1 https://github.com/google/fuzzer-test-suite
WORKDIR libspng
COPY build.sh $SRC/

View File

@ -24,6 +24,13 @@ $CXX $CXXFLAGS -std=c++11 -I. \
-o $OUT/spng_read_fuzzer \
-lFuzzingEngine $SRC/libspng/build/libspng.a -lz
$CXX $CXXFLAGS -std=c++11 -I. \
$SRC/libspng/tests/spng_read_fuzzer.cc \
-o $OUT/spng_read_fuzzer_structure_aware \
-include ../fuzzer-test-suite/libpng-1.2.56/png_mutator.h \
-D PNG_MUTATOR_DEFINE_LIBFUZZER_CUSTOM_MUTATOR \
-lFuzzingEngine $SRC/libspng/build/libspng.a -lz
find $SRC/libspng/tests/images -name "*.png" | \
xargs zip $OUT/spng_read_fuzzer_seed_corpus.zip