run-ossfuzz-corpus.sh 500 B

123456789101112131415
  1. #/bin/sh
  2. ls src/fuzz_* | while read ftarget
  3. do
  4. target=$(basename $ftarget)
  5. echo "target $target"
  6. #download public corpus
  7. rm -f public.zip
  8. wget --quiet "https://storage.googleapis.com/suricata-backup.clusterfuzz-external.appspot.com/corpus/libFuzzer/suricata_$target/public.zip"
  9. rm -rf corpus_$target
  10. unzip -q public.zip -d corpus_$target
  11. #run target on corpus.
  12. export LLVM_PROFILE_FILE="/tmp/$target.profraw"
  13. /usr/bin/time -v ./src/$target corpus_$target
  14. done