[dataset] do not allow Extended TLVs in Operational Dataset (#5966)

This commit is contained in:
Jonathan Hui
2020-12-17 07:08:15 -08:00
committed by GitHub
parent 14cab3a7f0
commit b3fc7bc453
+2 -1
View File
@@ -173,7 +173,8 @@ bool Dataset::IsValid(void) const
for (const Tlv *cur = GetTlvsStart(); cur < end; cur = cur->GetNext())
{
VerifyOrExit((cur + 1) <= end && cur->GetNext() <= end && Tlv::IsValid(*cur), rval = false);
VerifyOrExit(!cur->IsExtended() && (cur + 1) <= end && cur->GetNext() <= end && Tlv::IsValid(*cur),
rval = false);
}
exit: