mirror of
https://github.com/DaveGamble/cJSON.git
synced 2024-12-26 12:41:03 +08:00
commit
f589f81a42
@ -2,6 +2,10 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "../cJSON.h"
|
#include "../cJSON.h"
|
||||||
|
|
||||||
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size); /* required by C89 */
|
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size); /* required by C89 */
|
||||||
@ -66,3 +70,7 @@ int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
@ -8,8 +8,7 @@ cd build
|
|||||||
cmake -DBUILD_SHARED_LIBS=OFF -DENABLE_CJSON_TEST=OFF ..
|
cmake -DBUILD_SHARED_LIBS=OFF -DENABLE_CJSON_TEST=OFF ..
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
|
|
||||||
$CC $CFLAGS -std=c89 -I. \
|
$CXX $CXXFLAGS $SRC/cjson/fuzzing/cjson_read_fuzzer.c -I. \
|
||||||
$SRC/cjson/fuzzing/cjson_read_fuzzer.c \
|
|
||||||
-o $OUT/cjson_read_fuzzer \
|
-o $OUT/cjson_read_fuzzer \
|
||||||
$LIB_FUZZING_ENGINE $SRC/cjson/build/libcjson.a
|
$LIB_FUZZING_ENGINE $SRC/cjson/build/libcjson.a
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user