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

Function LLVMFuzzerTestOneInput

fuzzers/fuzz_bson_encoder.cpp:9–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7using namespace jsoncons::bson;
8
9extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size)
10{
11 std::string s(reinterpret_cast<const char*>(data), size);
12 std::istringstream is(s);
13 std::vector<uint8_t> s1;
14 bson_bytes_encoder encoder(s1);
15 bson_stream_reader reader(is, encoder);
16
17 std::error_code ec;
18 reader.read(ec);
19
20 return 0;
21}

Callers

nothing calls this directly

Calls 1

readMethod · 0.45

Tested by

no test coverage detected