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.
30 lines
407 B
30 lines
407 B
|
|
|
|
#include <stdint.h> |
|
#include <stddef.h> |
|
|
|
#include <I2NPProtocol.h> |
|
#include <RouterContext.h> |
|
|
|
#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::context.ProcessGarlicMessage( |
|
i2p::CreateI2NPMessage(msgType, data, size)); |
|
|
|
return true; |
|
}
|
|
|