[meshcop-tlvs] fix ChannelMaskBaseTlv::IsValid() (#5929)

This commit is contained in:
Jonathan Hui
2020-12-10 11:49:57 -08:00
committed by GitHub
parent 3d21a846d9
commit 02f7dbb42b
+1 -1
View File
@@ -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);