mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-05-21 06:41:48 +02:00
Added undefined behavior sanitizer.
Combined common sanitizer flags. Added fuzzers.
This commit is contained in:
parent
5022a9c610
commit
5f6bbd3eb9
23 changed files with 813 additions and 4 deletions
23
fuzzing/fuzz-BlindedPublicKey.cc
Normal file
23
fuzzing/fuzz-BlindedPublicKey.cc
Normal file
|
@ -0,0 +1,23 @@
|
|||
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <string>
|
||||
|
||||
#include <Blinding.h>
|
||||
|
||||
#include "fuzzing.h"
|
||||
|
||||
|
||||
bool
|
||||
fuzzing_testinput(const uint8_t * data, size_t size)
|
||||
{
|
||||
std::string str((const char *) data, size);
|
||||
i2p::data::BlindedPublicKey * bpk;
|
||||
|
||||
|
||||
bpk = new i2p::data::BlindedPublicKey(str);
|
||||
delete bpk;
|
||||
|
||||
return true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue