From ac5122f95a0abb68f6f2b7624a160b88dd8c8c70 Mon Sep 17 00:00:00 2001 From: xuezhou_yan Date: Sat, 3 Aug 2024 09:28:38 +0800 Subject: [PATCH] =?UTF-8?q?#IAHKVH=20=E5=91=8A=E8=AD=A6=E6=B8=85=E7=90=86?= =?UTF-8?q?=EF=BC=8C=E7=A1=AE=E4=BF=9D=E6=9C=89=E7=AC=A6=E5=8F=B7=E6=95=B4?= =?UTF-8?q?=E6=95=B0=E8=BF=90=E7=AE=97=E4=B8=8D=E6=BA=A2=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xuezhou_yan --- src/create_pcid.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/create_pcid.c b/src/create_pcid.c index 4972ac9..0549f05 100644 --- a/src/create_pcid.c +++ b/src/create_pcid.c @@ -358,7 +358,7 @@ static int32_t GetPriSyscapResult(cJSON *capVectorPtr, int32_t ret) return ret; } -int32_t GetPriSyscap(PCIDMain *pcidMain, cJSON *sysCapObject, size_t contextBufLen) +int32_t GetPriSyscap(PCIDMain *pcidMain, cJSON *sysCapObject, uint32_t contextBufLen) { cJSON *capVectorPtr = cJSON_CreateArray(); if (capVectorPtr == NULL) { @@ -366,11 +366,6 @@ int32_t GetPriSyscap(PCIDMain *pcidMain, cJSON *sysCapObject, size_t contextBufL return -1; } - if (contextBufLen > UINT32_MAX) { - PRINT_ERR("the data privateSyscapLen is out of scope."); - return GetPriSyscapResult(capVectorPtr, -1); - } - int32_t privateSyscapLen = (int32_t)(contextBufLen - sizeof(PCIDMain) - 1); if (privateSyscapLen < 0 || privateSyscapLen > INT32_MAX) { PRINT_ERR("parse private syscap failed.");