#include #include #include #include using namespace chip; /** * @file * This file describes a Fuzzer for decoding base38 encoded strings. */ extern "C" int LLVMFuzzerTestOneInput(const uint8_t * data, size_t len) { std::string base38EncodedString(reinterpret_cast(data), len); std::vector decodedData; // Ignoring return value, because in general the data is garbage and won't decode properly. // We're just testing that the decoder does not crash on the fuzzer-generated inputs. chip::base38Decode(base38EncodedString, decodedData); return 0; }