[cli] fix infinite loop on networkdiagnostic (#4882)

Reproduce by issuing networkdiagnostic get ff03::1 0 1 on one router.
This commit is contained in:
Yakun Xu
2020-04-24 08:49:21 -07:00
committed by GitHub
parent c0075d42c3
commit a13d8b958f
+1 -1
View File
@@ -1029,7 +1029,7 @@ exit:
if (error == OT_ERROR_NONE)
{
aNetworkDiagTlv.mType = tlv.GetType();
aIterator = offset - message.GetOffset();
aIterator = static_cast<uint16_t>(offset - message.GetOffset() + tlv.GetSize());
}
return error;
}