| 12 | }; |
| 13 | |
| 14 | extern "C" int LLVMFuzzerTestOneInput(const std::uint8_t* data, const std::size_t size) |
| 15 | { |
| 16 | FuzzedDataProvider fdp{data, size}; |
| 17 | |
| 18 | std::string plaintext = fdp.ConsumeRandomLengthString(); |
| 19 | std::string encoded = crow::utility::base64encode(plaintext, plaintext.size()); |
| 20 | std::string decoded = crow::utility::base64decode(encoded, encoded.size()); |
| 21 | |
| 22 | if (plaintext != decoded) |
| 23 | { |
| 24 | throw FuzzException(); |
| 25 | } |
| 26 | return 0; |
| 27 | } |
nothing calls this directly
no test coverage detected