mirror of https://github.com/PurpleI2P/i2pd.git
I2P: End-to-End encrypted and anonymous Internet
https://i2pd.website/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
396 B
31 lines
396 B
1 year ago
|
|
||
|
|
||
|
#include <stdint.h>
|
||
|
#include <stddef.h>
|
||
|
|
||
|
#include <I2NPProtocol.h>
|
||
|
#include <NetDb.hpp>
|
||
|
|
||
|
#include "fuzzing.h"
|
||
|
|
||
|
|
||
|
bool
|
||
|
fuzzing_testinput(const uint8_t * data, size_t size)
|
||
|
{
|
||
|
i2p::I2NPMessageType msgType;
|
||
|
|
||
|
|
||
|
if(size < 1)
|
||
|
return true;
|
||
|
|
||
|
msgType = (i2p::I2NPMessageType) data[0];
|
||
|
|
||
|
data++;
|
||
|
size--;
|
||
|
|
||
|
i2p::data::netdb.PostI2NPMsg(
|
||
|
i2p::CreateI2NPMessage(msgType, data, size));
|
||
|
|
||
|
return true;
|
||
|
}
|