[php] Enable unserializehash fuzzer (#4049)

This commit is contained in:
Nikita Popov 2020-06-30 18:54:25 +02:00 committed by GitHub
parent d4b88fc4e1
commit 26af5e0e25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 7 deletions

View File

@ -42,17 +42,20 @@ export CXXFLAGS="$CXXFLAGS -fno-sanitize=object-size"
--with-pic
make -j$(nproc)
# Generate dictionary for unserialize fuzzer
sapi/cli/php sapi/fuzzer/generate_unserialize_dict.php
# Generate corpuses and dictionaries.
sapi/cli/php sapi/fuzzer/generate_all.php
# Copy dictionaries to expected locations.
cp sapi/fuzzer/dict/unserialize $OUT/php-fuzz-unserialize.dict
# Generate initial corpus for parser fuzzer
sapi/cli/php sapi/fuzzer/generate_parser_corpus.php
cp sapi/fuzzer/dict/parser $OUT/php-fuzz-parser.dict
cp sapi/fuzzer/json.dict $OUT/php-fuzz-json.dict
FUZZERS="php-fuzz-json php-fuzz-exif php-fuzz-mbstring php-fuzz-unserialize php-fuzz-parser"
FUZZERS="php-fuzz-json
php-fuzz-exif
php-fuzz-mbstring
php-fuzz-unserialize
php-fuzz-unserializehash
php-fuzz-parser"
for fuzzerName in $FUZZERS; do
cp sapi/fuzzer/$fuzzerName $OUT/
done