diff --git a/projects/libpng/Dockerfile b/projects/libpng/Dockerfile index 690b357d3..61a6fda5e 100644 --- a/projects/libpng/Dockerfile +++ b/projects/libpng/Dockerfile @@ -18,6 +18,6 @@ FROM ossfuzz/base-builder MAINTAINER mmoroz@chromium.org RUN apt-get install -y make autoconf automake libtool zlib1g-dev -RUN git clone --depth 1 git://git.code.sf.net/p/libpng/code libpng +RUN git clone --depth 1 https://github.com/glennrp/libpng.git WORKDIR libpng COPY build.sh libpng_read_fuzzer.* png.dict $SRC/ diff --git a/projects/libpng/build.sh b/projects/libpng/build.sh index 0b208fc41..7a80da597 100755 --- a/projects/libpng/build.sh +++ b/projects/libpng/build.sh @@ -26,9 +26,12 @@ autoreconf -f -i make -j$(nproc) clean make -j$(nproc) all -# build libpng_read_fuzzer +# build libpng_read_fuzzer. $CXX $CXXFLAGS -std=c++11 -I. -lz \ $SRC/libpng_read_fuzzer.cc -o $OUT/libpng_read_fuzzer \ -lFuzzingEngine .libs/libpng16.a +# add seed corpus. +find $SRC/libpng -name "*.png" | xargs zip $OUT/libpng_read_fuzzer_seed_corpus.zip + cp $SRC/*.dict $SRC/*.options $OUT/