Improve a bit libarchive's corpus (#8683)

- Add corkami's repository of weird formats/archives
- Speed up compilation a bit

Co-authored-by: Julien Voisin <jvoisin@google.com>
This commit is contained in:
Julien Voisin 2022-10-05 12:20:41 +02:00 committed by GitHub
parent 2f75288878
commit 0a8a100e8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -45,12 +45,16 @@ sed -i 's/-Werror//g' ./CMakeLists.txt
mkdir build2
cd build2
cmake ../
make
make -j$(nproc)
# build seed
cp $SRC/libarchive/contrib/oss-fuzz/corpus.zip\
$OUT/libarchive_fuzzer_seed_corpus.zip
# add weird archives
git clone --depth=1 https://github.com/corkami/pocs
find $SRC/pocs/ -type f -print0 | xargs -0 -I % zip -jr $OUT/libarchive_fuzzer_seed_corpus.zip %
# build fuzzer(s)
$CXX $CXXFLAGS -I../libarchive \
$SRC/libarchive_fuzzer.cc -o $OUT/libarchive_fuzzer \