mirror of
https://github.com/espressif/openthread.git
synced 2026-08-07 11:17:46 +00:00
[mpl] add extra validation when removing MPL Option (#3851)
This commit is contained in:
@@ -364,6 +364,8 @@ otError Ip6::RemoveMplOption(Message &aMessage)
|
||||
mplOffset = offset;
|
||||
mplLength = option.GetLength();
|
||||
|
||||
VerifyOrExit(mplLength <= sizeof(OptionMpl) - sizeof(OptionHeader), error = OT_ERROR_PARSE);
|
||||
|
||||
if (mplOffset == sizeof(ip6Header) + sizeof(hbh) && hbh.GetLength() == 0)
|
||||
{
|
||||
// first and only IPv6 Option, remove IPv6 HBH Option header
|
||||
|
||||
Reference in New Issue
Block a user