From cea71828c07f17f7f0d3b1e1aa4f51a2249c18ad Mon Sep 17 00:00:00 2001 From: Michael Macnair Date: Mon, 25 Jul 2022 13:38:59 +0100 Subject: [PATCH] file: Add elf and pe seeds (#8073) * file: Add elf and pe seeds * file: make binary-samples path explicit * Update Dockerfile Co-authored-by: jonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com> --- projects/file/Dockerfile | 4 ++++ projects/file/build.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/file/Dockerfile b/projects/file/Dockerfile index b6f640885..973ba603c 100644 --- a/projects/file/Dockerfile +++ b/projects/file/Dockerfile @@ -17,5 +17,9 @@ FROM gcr.io/oss-fuzz-base/base-builder RUN apt-get update && apt-get install -y make autoconf automake libtool shtool RUN git clone --depth 1 https://github.com/file/file.git + +# Supplement file's existing test files to get elf + pe coverage. +RUN git clone --depth 1 https://github.com/DavidKorczynski/binary-samples.git + WORKDIR file COPY build.sh magic_fuzzer.cc $SRC/ diff --git a/projects/file/build.sh b/projects/file/build.sh index 66223bc61..1cccb8356 100755 --- a/projects/file/build.sh +++ b/projects/file/build.sh @@ -25,4 +25,4 @@ $CXX $CXXFLAGS -std=c++11 -Isrc/ \ cp ./magic/magic.mgc $OUT/ -zip -j $OUT/magic_fuzzer_seed_corpus.zip ./tests/*.testfile +zip -j $OUT/magic_fuzzer_seed_corpus.zip ./tests/*.testfile $SRC/binary-samples/{elf,pe}-*