mirror of
https://github.com/espressif/openthread.git
synced 2026-10-15 04:07:40 +00:00
[meshcop-tlvs] fix ChannelMaskBaseTlv::IsValid() (#5929)
This commit is contained in:
@@ -189,7 +189,7 @@ bool ChannelMaskBaseTlv::IsValid(void) const
|
||||
|
||||
VerifyOrExit(entry != nullptr);
|
||||
|
||||
while (reinterpret_cast<const uint8_t *>(entry) < end)
|
||||
while (reinterpret_cast<const uint8_t *>(entry) + sizeof(ChannelMaskEntryBase) <= end)
|
||||
{
|
||||
entry = entry->GetNext();
|
||||
VerifyOrExit(reinterpret_cast<const uint8_t *>(entry) <= end);
|
||||
|
||||
Reference in New Issue
Block a user