ossfuzz.sh 529 B

123456789101112131415161718
  1. #!/bin/bash -eu
  2. # This script is meant to be run by
  3. # https://github.com/google/oss-fuzz/blob/master/projects/cjson/Dockerfile
  4. mkdir build
  5. cd build
  6. cmake -DBUILD_SHARED_LIBS=OFF -DENABLE_CJSON_TEST=OFF ..
  7. make -j$(nproc)
  8. $CXX $CXXFLAGS $SRC/cjson/fuzzing/cjson_read_fuzzer.c -I. \
  9. -o $OUT/cjson_read_fuzzer \
  10. $LIB_FUZZING_ENGINE $SRC/cjson/build/libcjson.a
  11. find $SRC/cjson/fuzzing/inputs -name "*" | \
  12. xargs zip $OUT/cjson_read_fuzzer_seed_corpus.zip
  13. cp $SRC/cjson/fuzzing/json.dict $OUT/cjson_read_fuzzer.dict