Coverage Report

Created: 2026-08-17 06:27

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/jsoncons/fuzzers/fuzz_bson.cpp
Line
Count
Source
1
#include <jsoncons_ext/bson/bson.hpp>
2
#include <jsoncons/json.hpp>
3
4
#include <sstream>
5
#include <vector>
6
#include <utility>
7
#include <ctime>
8
#include <limits>
9
10
using namespace jsoncons;
11
12
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size)
13
5.02k
{
14
5.02k
    std::string input(reinterpret_cast<const char*>(data), size);
15
5.02k
    std::istringstream is(input);
16
5.02k
    try {
17
5.02k
       json j2 = bson::decode_bson<json>(is);
18
5.02k
    }
19
5.02k
    catch(const jsoncons::ser_error&) {}
20
21
5.02k
    return 0;
22
5.02k
}