tokener_parse_ex_fuzzer.cc 343 B

12345678910111213
  1. #include <stdint.h>
  2. #include <json.h>
  3. extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
  4. const char *data1 = reinterpret_cast<const char *>(data);
  5. json_tokener *tok = json_tokener_new();
  6. json_object *obj = json_tokener_parse_ex(tok, data1, size);
  7. json_object_put(obj);
  8. json_tokener_free(tok);
  9. return 0;
  10. }