fix: 修改不规范fuzz用例

Signed-off-by: fan-jingle <fanjingle@h-partners.com>
This commit is contained in:
fan-jingle 2024-11-06 15:06:20 +08:00
parent 6584f49567
commit 67904dc4f8

View File

@ -282,7 +282,7 @@ namespace OHOS {
int FuzzGetPermissionByIndex(const uint8_t *data, size_t size) int FuzzGetPermissionByIndex(const uint8_t *data, size_t size)
{ {
int32_t index = static_cast<int32_t>(size); int32_t index = *(reinterpret_cast<const int32_t*>(data));
if (GetPermissionByIndex(nullptr, index) == nullptr) { if (GetPermissionByIndex(nullptr, index) == nullptr) {
return -1; return -1;
} }