mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-23 17:36:37 +02:00
Added ToBase64Standard fuzzer.
This commit is contained in:
parent
3d5ec97444
commit
acfa3938ba
2 changed files with 22 additions and 0 deletions
|
@ -42,6 +42,7 @@ set(FUZZERS
|
||||||
RouterContext-DecryptTunnelBuildRecord
|
RouterContext-DecryptTunnelBuildRecord
|
||||||
RouterContext-ProcessDeliveryStatusMessage
|
RouterContext-ProcessDeliveryStatusMessage
|
||||||
RouterContext-ProcessGarlicMessage
|
RouterContext-ProcessGarlicMessage
|
||||||
|
ToBase64Standard
|
||||||
)
|
)
|
||||||
|
|
||||||
string(REPLACE "fuzzer-no-link" "fuzzer" _LINK_FLAGS "${_SANITIZE_FLAGS}")
|
string(REPLACE "fuzzer-no-link" "fuzzer" _LINK_FLAGS "${_SANITIZE_FLAGS}")
|
||||||
|
|
21
fuzzing/fuzz-ToBase64Standard.cc
Normal file
21
fuzzing/fuzz-ToBase64Standard.cc
Normal file
|
@ -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…
Add table
Reference in a new issue