fix: EncodePrivateSyscap input null point should return true.

Signed-off-by: yudechen <chenyude@huawei.com>
Change-Id: I2ebf3fec0fd08a30763355f86ac7e35215016b61
This commit is contained in:
yudechen
2022-08-11 19:48:33 +08:00
parent ce7265fbbb
commit 104f846825
3 changed files with 8 additions and 4 deletions
+2 -2
View File
@@ -275,8 +275,8 @@ int32_t CreatePCID(char *inputFile, char *outDirPath)
for (i = 0; i < privateCapSize; i++) {
jsonArrayItem = cJSON_GetArrayItem(jsonPriSyscapObj, i);
priSyscapStr = strchr(jsonArrayItem->valuestring, '.') + 1;
nRet = strcat_s(priSyscapHead, PRIVATE_SYSCAP_SIZE - 1, priSyscapStr);
nRet += strcat_s(priSyscapHead, PRIVATE_SYSCAP_SIZE - 1, ",");
nRet = strcat_s(priSyscapHead, allPriSyscapStrLen + 1, priSyscapStr);
nRet += strcat_s(priSyscapHead, allPriSyscapStrLen + 1, ",");
if (nRet != EOK) {
PRINT_ERR("strcat_s \"pri\" string is failed\n");
ret = -1;