update test/fuzztest/redactionutils_fuzzer/redactionutils_fuzzer.cpp.

Signed-off-by: zhuhongtao666 <zhuhongtao12@huawei.com>
This commit is contained in:
zhuhongtao666 2022-11-17 10:50:11 +00:00 committed by Gitee
parent 998b485541
commit 7daea9dd80
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -20,7 +20,7 @@
namespace OHOS {
bool RedactionUtilsFuzzTest(const uint8_t *data, size_t size)
{
if ((data == nullptr) || (size <= 0)) {
if ((data == nullptr) || (size <= sizeof(int32_t))) {
return false;
}
int32_t state32 = *(reinterpret_cast<const int32_t *>(data));