update test/fuzztest/sysparamdynamic_fuzzer/sysparamdynamic_fuzzer.cpp.

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

View File

@ -21,7 +21,7 @@
namespace OHOS {
bool SysparamDynamicFuzzTest(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));