Coverage Report

Created: 2025-12-05 06:17

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/jsoncons/fuzzers/fuzz_bigint.cpp
Line
Count
Source
1
#include <jsoncons/utility/bigint.hpp>
2
#include <string>
3
4
using namespace jsoncons;
5
6
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size) 
7
1.93k
{
8
1.93k
  std::string input(reinterpret_cast<const char*>(data), size);
9
1.93k
  try {
10
1.93k
        if (size < 5000) // Tests show that it will compute for very large size, but size 316737 taxes Google fuzz patience
11
1.89k
        {
12
1.89k
            bigint a("56654250564056135415631554531554513813");
13
1.89k
            bigint b(input);
14
1.89k
            bigint c = a % b;
15
1.89k
            bigint d = b % a;
16
1.89k
        }
17
1.93k
  }
18
1.93k
  catch (const std::runtime_error&) {}
19
20
1.93k
  return 0;
21
1.93k
}