Coverage Report

Created: 2026-08-18 06:21

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/jsoncons/fuzzers/fuzz_json_cursor.cpp
Line
Count
Source
1
#include <jsoncons/json_parser.hpp>
2
#include <jsoncons/json_cursor.hpp>
3
#include <jsoncons/json.hpp>
4
5
using namespace jsoncons;
6
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size)
7
3.30k
{
8
3.30k
        std::string s(reinterpret_cast<const char*>(data), size);
9
3.30k
        std::istringstream is(s);
10
11
3.30k
        std::error_code ec;
12
3.30k
        json_stream_cursor reader(is, ec);
13
5.18k
        while (!reader.done() && !ec)
14
1.88k
        {
15
1.88k
                const auto& event = reader.current();
16
1.88k
                std::string s2 = event.get<std::string>(ec);
17
1.88k
                if (!ec)
18
1.87k
                {
19
1.87k
                    reader.next(ec);
20
1.87k
                }
21
1.88k
        }
22
23
3.30k
        return 0;
24
3.30k
}