bug 2173: WifiInformationElement::DeserializeIfPresent attempts to read beyond the end of buffer
This commit is contained in:
@@ -992,7 +992,7 @@ uint8_t
|
||||
Buffer::Iterator::PeekU8 (void)
|
||||
{
|
||||
NS_ASSERT_MSG (m_current >= m_dataStart &&
|
||||
m_current <= m_dataEnd,
|
||||
m_current < m_dataEnd,
|
||||
GetReadErrorMessage ());
|
||||
|
||||
if (m_current < m_zeroStart)
|
||||
|
||||
@@ -61,6 +61,10 @@ WifiInformationElement::Deserialize (Buffer::Iterator i)
|
||||
Buffer::Iterator
|
||||
WifiInformationElement::DeserializeIfPresent (Buffer::Iterator i)
|
||||
{
|
||||
if (i.IsEnd ())
|
||||
{
|
||||
return i;
|
||||
}
|
||||
Buffer::Iterator start = i;
|
||||
uint8_t elementId = i.ReadU8 ();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user