update test/fuzztest/sysparamstatic_fuzzer/sysparamstatic_fuzzer.cpp.

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

View File

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