MCPcopy Create free account
hub / github.com/fmtlib/fmt / LLVMFuzzerTestOneInput

Function LLVMFuzzerTestOneInput

test/fuzzing/two-args.cc:89–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
90 if (size <= 3) return 0;
91
92 // Switch types depending on the first byte of the input.
93 const auto type1 = data[0] & 0x0F;
94 const auto type2 = (data[0] & 0xF0) >> 4;
95 data++;
96 size--;
97 try {
98 invoke(type1, [=](auto param1) {
99 invoke(type2, [=](auto param2) {
100 invoke_fmt<decltype(param1), decltype(param2)>(data, size);
101 });
102 });
103 } catch (std::exception&) {
104 }
105 return 0;
106}

Callers

nothing calls this directly

Calls 1

invokeFunction · 0.70

Tested by

no test coverage detected