| 24 | #define kMaxInputLength 1024 |
| 25 | |
| 26 | extern "C" int |
| 27 | LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) |
| 28 | { |
| 29 | if (size < kMinInputLength || size > kMaxInputLength){ |
| 30 | return 1; |
| 31 | } |
| 32 | |
| 33 | std::string input(reinterpret_cast<const char*>(data), size); |
| 34 | |
| 35 | { |
| 36 | std::string encoded; |
| 37 | std::string decoded; |
| 38 | butil::Base64Encode(input, &encoded); |
| 39 | butil::Base64Decode(input, &decoded); |
| 40 | } |
| 41 | { |
| 42 | butil::crc32c::Value(reinterpret_cast<const char*>(data), size); |
| 43 | } |
| 44 | { |
| 45 | butil::Hash(input); |
| 46 | } |
| 47 | { |
| 48 | butil::SHA1HashString(input); |
| 49 | } |
| 50 | |
| 51 | return 0; |
| 52 | } |
nothing calls this directly
no test coverage detected