check option and packet length

This commit is contained in:
orignal 2024-08-14 13:43:24 -04:00
parent 11328a429d
commit 09dbe9fc03
2 changed files with 6 additions and 1 deletions

View file

@ -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)