mirror of
https://gitee.com/openharmony/security_permission_lite
synced 2024-11-27 08:50:47 +00:00
commit
0ca31d4cfd
@ -239,13 +239,8 @@ static int ParsePermissions(const char *jsonStr, PermissionSaved **perms, int *p
|
||||
*perms = NULL;
|
||||
return PERM_ERRORCODE_JSONPARSE_FAIL;
|
||||
}
|
||||
if (strcpy_s((*perms + i)->name, PERM_NAME_LEN, itemName->valuestring) != EOK) {
|
||||
cJSON_Delete(root);
|
||||
free(*perms);
|
||||
*perms = NULL;
|
||||
return PERM_ERRORCODE_COPY_ERROR;
|
||||
}
|
||||
if (strcpy_s((*perms + i)->desc, PERM_DESC_LEN, itemDesc->valuestring) != EOK) {
|
||||
if (strcpy_s((*perms + i)->name, PERM_NAME_LEN, itemName->valuestring) != EOK
|
||||
|| strcpy_s((*perms + i)->desc, PERM_DESC_LEN, itemDesc->valuestring) != EOK) {
|
||||
cJSON_Delete(root);
|
||||
free(*perms);
|
||||
*perms = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user