MCPcopy Create free account
hub / github.com/danielaparker/jsoncons / LLVMFuzzerTestOneInput

Function LLVMFuzzerTestOneInput

fuzzers/fuzz_ubjson.cpp:12–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10using namespace jsoncons;
11
12extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size)
13{
14 std::string input(reinterpret_cast<const char*>(data), size);
15 std::istringstream is(input);
16 try {
17 json j2 = ubjson::decode_ubjson<json>(is);
18 }
19 catch(const jsoncons::ser_error&) {}
20
21 return 0;
22}
23

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected