From 0f2c466cdd6740a57c6091208baf6a0745828655 Mon Sep 17 00:00:00 2001 From: tongkai0808fh Date: Fri, 28 Jun 2024 07:16:37 +0000 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3nterfaces/inner=5Fapi/syscap?= =?UTF-8?q?=5Finterface.c=E6=96=87=E4=BB=B6=E4=B8=ADinputPos=E5=8F=98?= =?UTF-8?q?=E9=87=8F=E9=9C=80=E5=88=A4=E7=A9=BA=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: tongkai0808fh --- interfaces/inner_api/syscap_interface.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/interfaces/inner_api/syscap_interface.c b/interfaces/inner_api/syscap_interface.c index c85b66a..bde4401 100644 --- a/interfaces/inner_api/syscap_interface.c +++ b/interfaces/inner_api/syscap_interface.c @@ -242,6 +242,11 @@ bool DecodePrivateSyscap(char *input, char (**output)[SINGLE_SYSCAP_LEN], int *o *output = outputArray; inputPos = input; + + if (inputPos == NULL) { + return false; + } + char buffer[SINGLE_FEAT_LEN] = {0}; char *bufferPos = buffer; while (*inputPos != '\0') {