2018-03-20 09:28:18 -07:00
|
|
|
#!/bin/bash
|
2018-04-02 15:44:02 -07:00
|
|
|
set -e
|
|
|
|
cargo install --force honggfuzz
|
2018-03-20 09:28:18 -07:00
|
|
|
for TARGET in fuzz_targets/*; do
|
|
|
|
FILENAME=$(basename $TARGET)
|
|
|
|
FILE="${FILENAME%.*}"
|
|
|
|
HFUZZ_BUILD_ARGS="--features honggfuzz_fuzz" HFUZZ_RUN_ARGS="-N1000000 --exit_upon_crash -v" cargo hfuzz run $FILE
|
2018-04-02 15:44:02 -07:00
|
|
|
if [ -f hfuzz_workspace/$FILE/HONGGFUZZ.REPORT.TXT ]; then
|
2018-03-20 09:28:18 -07:00
|
|
|
cat hfuzz_workspace/$FILE/HONGGFUZZ.REPORT.TXT
|
|
|
|
for CASE in hfuzz_workspace/$FILE/SIG*; do
|
|
|
|
cat $CASE | xxd -p
|
|
|
|
done
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
done
|