修改memcpy_s传参

Signed-off-by: 我辰辰呢 <huangteng10@huawei.com>
This commit is contained in:
我辰辰呢 2024-01-10 10:33:42 +00:00 committed by Gitee
parent 48e6dcbfb5
commit 6c5c47aa00
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -50,7 +50,8 @@ namespace OHOS {
}
HcfDhCommParamsSpec *returnCommonParamSpec = nullptr;
int32_t pLen = 0;
(void)memcpy_s(&pLen, sizeof(int32_t), data, sizeof(int32_t));
const int32_t int32Size = sizeof(int32_t);
(void)memcpy_s(&pLen, int32Size, data, int32Size);
HcfResult res = HcfDhKeyUtilCreate(pLen, 0, &returnCommonParamSpec);
if (res != HCF_SUCCESS) {
return false;