#!/bin/bash COMMIT_HASH="153dfb75531c0b73499cef9380357fe0c49a3968" git clone https://github.com/SekoiaTree/oss-fuzz.git oss-fuzz-wo cd oss-fuzz-wo git checkout $COMMIT_HASH sed -i 's/BRANCH_TO_CHECKOUT/v1.6.48/g' projects/libpng/Dockerfile sed -i 's/#FUZZ_SEED_DISABLE //g' projects/libpng/Dockerfile python3 infra/helper.py build_image --pull libpng python3 infra/helper.py build_fuzzers --clean libpng mkdir -p build/out/corpus python3 infra/helper.py run_fuzzer libpng libpng_read_fuzzer --corpus-dir build/out/corpus python3 infra/helper.py build_fuzzers --sanitizer coverage libpng # no-serve: to exit immediately # port: in case port 8008 is already allocated, even with no-serve it fails otherwise... python3 infra/helper.py coverage libpng --corpus-dir build/out/corpus --fuzz-target libpng_read_fuzzer --no-serve --port 9531