diff --git a/fuzzing/CMakeLists.txt b/fuzzing/CMakeLists.txt index b18b4e9a..5f079d3b 100644 --- a/fuzzing/CMakeLists.txt +++ b/fuzzing/CMakeLists.txt @@ -42,6 +42,7 @@ set(FUZZERS RouterContext-DecryptTunnelBuildRecord RouterContext-ProcessDeliveryStatusMessage RouterContext-ProcessGarlicMessage + ToBase64Standard ) string(REPLACE "fuzzer-no-link" "fuzzer" _LINK_FLAGS "${_SANITIZE_FLAGS}") diff --git a/fuzzing/fuzz-ToBase64Standard.cc b/fuzzing/fuzz-ToBase64Standard.cc new file mode 100644 index 00000000..2707d74d --- /dev/null +++ b/fuzzing/fuzz-ToBase64Standard.cc @@ -0,0 +1,21 @@ + + +#include +#include +#include + +#include + +#include "fuzzing.h" + + +bool +fuzzing_testinput(const uint8_t * data, size_t size) +{ + std::string str((const char *) data, size); + + + i2p::data::ToBase64Standard(str); + + return true; +}