MCPcopy Create free account
hub / github.com/danielaparker/jsoncons / LLVMFuzzerTestOneInput

Function LLVMFuzzerTestOneInput

fuzzers/fuzz_bigint.cpp:6–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4using namespace jsoncons;
5
6extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, std::size_t size)
7{
8 std::string input(reinterpret_cast<const char*>(data), size);
9 try {
10 if (size < 5000) // Tests show that it will compute for very large size, but size 316737 taxes Google fuzz patience
11 {
12 bigint a("56654250564056135415631554531554513813");
13 bigint b(input);
14 bigint c = a % b;
15 bigint d = b % a;
16 }
17 }
18 catch (const std::runtime_error&) {}
19
20 return 0;
21}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected