Browse Source

Added ToBase64Standard fuzzer.

pull/1949/head
Chad Fraleigh 1 year ago
parent
commit
acfa3938ba
  1. 1
      fuzzing/CMakeLists.txt
  2. 21
      fuzzing/fuzz-ToBase64Standard.cc

1
fuzzing/CMakeLists.txt

@ -42,6 +42,7 @@ set(FUZZERS @@ -42,6 +42,7 @@ set(FUZZERS
RouterContext-DecryptTunnelBuildRecord
RouterContext-ProcessDeliveryStatusMessage
RouterContext-ProcessGarlicMessage
ToBase64Standard
)
string(REPLACE "fuzzer-no-link" "fuzzer" _LINK_FLAGS "${_SANITIZE_FLAGS}")

21
fuzzing/fuzz-ToBase64Standard.cc

@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
#include <stdint.h>
#include <stddef.h>
#include <string>
#include <Base.h>
#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;
}
Loading…
Cancel
Save