cJSON
[Ported from github.com/DaveGamble/cJSON] Fix: heap-use-after-free in merge_patch when patch is subtree of target (#1065)
Brought by drakestapleton
| 1 | #!/bin/bash -eu |
| 2 | |
| 3 | # This script is meant to be run by |
| 4 | # https://github.com/google/oss-fuzz/blob/master/projects/cjson/Dockerfile |
| 5 | |
| 6 | mkdir build |
| 7 | cd build |
| 8 | cmake -DBUILD_SHARED_LIBS=OFF -DENABLE_CJSON_TEST=OFF .. |
| 9 | make -j$(nproc) |
| 10 | |
| 11 | $CXX $CXXFLAGS $SRC/cjson/fuzzing/cjson_read_fuzzer.c -I. \ |
| 12 | -o $OUT/cjson_read_fuzzer \ |
| 13 | $LIB_FUZZING_ENGINE $SRC/cjson/build/libcjson.a |
| 14 | |
| 15 | find $SRC/cjson/fuzzing/inputs -name "*" | \ |
| 16 | xargs zip $OUT/cjson_read_fuzzer_seed_corpus.zip |
| 17 | |
| 18 | cp $SRC/cjson/fuzzing/json.dict $OUT/cjson_read_fuzzer.dict |