fix upper limit error when processing MeshCoP TLVs in HandleDiscoveryResponse (#1383)

This commit is contained in:
rongli
2017-02-23 21:58:45 -08:00
committed by Jonathan Hui
parent 575ef7b866
commit 1587835134
+1 -1
View File
@@ -3033,7 +3033,7 @@ ThreadError Mle::HandleDiscoveryResponse(const Message &aMessage, const Ip6::Mes
VerifyOrExit(offset < end, error = kThreadError_Parse);
offset += sizeof(tlv);
end = offset + sizeof(tlv) + tlv.GetLength();
end = offset + tlv.GetLength();
memset(&result, 0, sizeof(result));
result.mPanId = threadMessageInfo->mPanId;