Skip to content

Commit

Permalink
Improve libmagic's corpus (#8533)
Browse files Browse the repository at this point in the history
Co-authored-by: Julien Voisin <jvoisin@google.com>
  • Loading branch information
jvoisin and Julien Voisin committed Sep 19, 2022
1 parent ee3a25c commit 609535a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion projects/file/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
5 changes: 4 additions & 1 deletion projects/file/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 609535a

Please sign in to comment.