mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-24 18:06:35 +02:00
30 lines
415 B
C++
30 lines
415 B
C++
|
|
|
|
#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.ProcessDeliveryStatusMessage(
|
|
i2p::CreateI2NPMessage(msgType, data, size));
|
|
|
|
return true;
|
|
}
|