Coverage Report

Created: 2026-01-09 06:56

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/jsoncons/fuzzers/fuzz_msgpack_encoder.cpp
Line
Count
Source
1
#include <jsoncons_ext/msgpack/msgpack.hpp>
2
#include <jsoncons_ext/msgpack/msgpack_reader.hpp>
3
4
#include <jsoncons/json.hpp>
5
#include <sstream>
6
7
using namespace jsoncons;
8
using namespace jsoncons::msgpack;
9
10
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size)
11
35.4k
{
12
35.4k
    std::string s(reinterpret_cast<const char*>(data), size);
13
35.4k
    std::istringstream is(s);
14
35.4k
    std::vector<uint8_t> s1;
15
35.4k
    msgpack_bytes_encoder encoder(s1);
16
35.4k
    msgpack_stream_reader reader(is, encoder);
17
18
35.4k
    std::error_code ec;
19
35.4k
    reader.read(ec);
20
21
35.4k
    return 0;
22
35.4k
}