MCPcopy Create free account
hub / github.com/Thalhammer/jwt-cpp / LLVMFuzzerTestOneInput

Function LLVMFuzzerTestOneInput

tests/fuzz/BaseDecodeFuzz.cpp:5–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3extern "C" {
4
5int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size) {
6 try {
7 const auto bin = jwt::base::decode<jwt::alphabet::base64>(std::string{(char*)Data, Size});
8 } catch (const std::runtime_error&) {
9 // parse errors are ok, because input may be random bytes
10 }
11 return 0; // Non-zero return values are reserved for future use.
12}
13}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected