diff --git a/projects/file/Dockerfile b/projects/file/Dockerfile index 8b3d32f5b1fc..11e0bf096609 100644 --- a/projects/file/Dockerfile +++ b/projects/file/Dockerfile @@ -18,8 +18,9 @@ FROM gcr.io/oss-fuzz-base/base-builder RUN apt-get update && apt-get install -y make autoconf automake libtool shtool zlib1g-dev:i386 RUN git clone --depth 1 https://github.com/file/file.git -# Supplement file's existing test files to get elf + pe coverage. +# Supplement file's existing test files RUN git clone --depth 1 https://github.com/DavidKorczynski/binary-samples.git +RUN git clone --depth 1 https://github.com/corkami/pocs WORKDIR file COPY build.sh magic_fuzzer.cc $SRC/ diff --git a/projects/file/build.sh b/projects/file/build.sh index 0dc74d6ab93c..d7ec8306ed27 100755 --- a/projects/file/build.sh +++ b/projects/file/build.sh @@ -25,4 +25,7 @@ $CXX $CXXFLAGS -std=c++11 -Isrc/ \ cp ./magic/magic.mgc $OUT/ -zip -j $OUT/magic_fuzzer_seed_corpus.zip ./tests/*.testfile $SRC/binary-samples/{elf,pe}-* +mkdir pocs_all +find $SRC/pocs/ -type f -print0 | xargs -0 -I % mv -f % ./pocs_all + +zip -j $OUT/magic_fuzzer_seed_corpus.zip ./tests/*.testfile $SRC/binary-samples/{elf,pe}-* $SRC/pocs_all