mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
check option and packet length
This commit is contained in:
@@ -297,6 +297,11 @@ namespace stream
|
||||
{
|
||||
const uint8_t * optionData = packet->GetOptionData ();
|
||||
size_t optionSize = packet->GetOptionSize ();
|
||||
if (optionSize > packet->len)
|
||||
{
|
||||
LogPrint (eLogInfo, "Streaming: Invalid option size ", optionSize, " Discarded");
|
||||
return false;
|
||||
}
|
||||
if (flags & PACKET_FLAG_DELAY_REQUESTED)
|
||||
{
|
||||
if (!m_IsAckSendScheduled)
|
||||
|
||||
Reference in New Issue
Block a user