Coverage Report

Created: 2026-03-21 06:16

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
2.22k
{
8
2.22k
  std::string input(reinterpret_cast<const char*>(data), size);
9
2.22k
  try {
10
2.22k
        if (size < 5000) // Tests show that it will compute for very large size, but size 316737 taxes Google fuzz patience
11
2.18k
        {
12
2.18k
            bigint a("56654250564056135415631554531554513813");
13
2.18k
            bigint b(input);
14
2.18k
            bigint c = a % b;
15
2.18k
            bigint d = b % a;
16
2.18k
        }
17
2.22k
  }
18
2.22k
  catch (const std::runtime_error&) {}
19
20
2.22k
  return 0;
21
2.22k
}