update standard/appspawn_msgmgr.c.

Signed-off-by: 樊景乐 <fanjingle@h-partners.com>
This commit is contained in:
樊景乐 2024-07-19 01:46:25 +00:00 committed by Gitee
parent 92d09eb580
commit 140b653115
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -263,6 +263,9 @@ int DecodeAppSpawnMsg(AppSpawnMsgNode *message)
uint32_t currLen = 0;
while (currLen < bufferLen) {
AppSpawnTlv *tlv = (AppSpawnTlv *)(message->buffer + currLen);
if (tlv == NULL) {
break;
}
APPSPAWN_CHECK(tlv->tlvLen <= (bufferLen - currLen), break,
"Invalid tlv [%{public}d %{public}d] curr: %{public}zu",
tlv->tlvType, tlv->tlvLen, currLen + sizeof(AppSpawnMsg));