Coverage Report

Created: 2025-10-12 07:21

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
17.0k
{
14
17.0k
    std::string input(reinterpret_cast<const char*>(data), size);
15
17.0k
    std::istringstream is(input);
16
17.0k
    try {
17
17.0k
       json j2 = bson::decode_bson<json>(is);
18
17.0k
    }
19
17.0k
    catch(const jsoncons::ser_error&) {}
20
21
17.0k
    return 0;
22
17.0k
}