update test/fuzztest/fileutils_fuzzer/fileutils_fuzzer.cpp.

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

View File

@ -20,7 +20,7 @@
namespace OHOS {
bool FileUtilFuzzTest(const uint8_t *data, size_t size)
{
if ((data == nullptr) || (size <= 0)) {
if ((data == nullptr) || (size <= sizeof(uint32_t))) {
return false;
}
unsigned int ustate = *(reinterpret_cast<const unsigned int *>(data));