From 634b5ab15fd36d02232331d7eb70f8c11de973a0 Mon Sep 17 00:00:00 2001 From: zhaohang Date: Mon, 29 Apr 2024 11:21:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=89=E5=85=A8=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhaohang --- interfaces/inner_api/syscap_interface.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/interfaces/inner_api/syscap_interface.c b/interfaces/inner_api/syscap_interface.c index 1a70a96..f2f8738 100644 --- a/interfaces/inner_api/syscap_interface.c +++ b/interfaces/inner_api/syscap_interface.c @@ -525,6 +525,9 @@ static int32_t CopySyscopToRet(struct PcidPriSyscapInfo *pcidPriSyscapInfo, cons break; } } + if(t == allSyscapNum){ + return -1; + } pcidPriSyscapInfo->ret = strcpy_s(tempSyscap, sizeof(char) * SINGLE_SYSCAP_LEN, g_arraySyscap[t].str); // 2, header of pcid & rpcid if (pcidPriSyscapInfo->ret != EOK) { -- Gitee