mirror of https://github.com/google/oss-fuzz.git
[rnp] Generate input corpus (#4322)
This commit is contained in:
parent
929dc5e247
commit
3d5478c653
|
@ -15,6 +15,8 @@
|
|||
#
|
||||
################################################################################
|
||||
|
||||
ORIG_DIR=$(pwd)
|
||||
|
||||
wget -qO- https://botan.randombit.net/releases/Botan-2.12.1.tar.xz | tar xvJ
|
||||
cd Botan-2.12.1
|
||||
./configure.py --prefix=/usr --cc-bin=$CXX --cc-abi-flags="$CXXFLAGS" \
|
||||
|
@ -23,7 +25,14 @@ cd Botan-2.12.1
|
|||
--with-fuzzer-lib='FuzzingEngine'
|
||||
make
|
||||
make install
|
||||
cd ..
|
||||
|
||||
cd $ORIG_DIR
|
||||
mkdir fuzzing_corpus
|
||||
|
||||
cd rnp/src/tests/data
|
||||
find . -type f -print0 | xargs -0 -I bob -- cp bob $ORIG_DIR/fuzzing_corpus/
|
||||
|
||||
cd $ORIG_DIR
|
||||
|
||||
# -DENABLE_SANITIZERS=0 because oss-fuzz will add the sanitizer flags in CFLAGS
|
||||
# See https://github.com/google/oss-fuzz/pull/4189 to explain CMAKE_C_LINK_EXECUTABLE
|
||||
|
@ -47,6 +56,7 @@ FUZZERS="fuzz_dump fuzz_keyring"
|
|||
for f in $FUZZERS; do
|
||||
cp src/fuzzing/$f "${OUT}/"
|
||||
chrpath -r '$ORIGIN/lib' "${OUT}/$f"
|
||||
zip -j -r "${OUT}/${f}_seed_corpus.zip" $ORIG_DIR/fuzzing_corpus/
|
||||
done
|
||||
|
||||
mkdir -p "${OUT}/lib"
|
||||
|
|
Loading…
Reference in New Issue