1
0
mirror of https://github.com/DaveGamble/cJSON synced 2024-12-22 22:52:14 +00:00
cJSON/fuzzing/ossfuzz.sh

19 lines
529 B
Bash
Raw Normal View History

2019-10-14 15:12:13 +00:00
#!/bin/bash -eu
# This script is meant to be run by
# https://github.com/google/oss-fuzz/blob/master/projects/cjson/Dockerfile
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=OFF -DENABLE_CJSON_TEST=OFF ..
make -j$(nproc)
2019-10-22 11:37:41 +00:00
$CXX $CXXFLAGS $SRC/cjson/fuzzing/cjson_read_fuzzer.c -I. \
2019-10-14 15:12:13 +00:00
-o $OUT/cjson_read_fuzzer \
$LIB_FUZZING_ENGINE $SRC/cjson/build/libcjson.a
find $SRC/cjson/fuzzing/inputs -name "*" | \
xargs zip $OUT/cjson_read_fuzzer_seed_corpus.zip
cp $SRC/cjson/fuzzing/json.dict $OUT/cjson_read_fuzzer.dict