update test/fuzztest/stringutils_fuzzer/stringutils_fuzzer.cpp.

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

View File

@ -21,7 +21,7 @@
namespace OHOS {
bool StringUtilsFuzzTest(const uint8_t *data, size_t size)
{
if ((data == nullptr) || (size <= 0)) {
if ((data == nullptr) || (size <= sizeof(string))) {
return false;
}
std::string metaData(reinterpret_cast<const char *>(data), size);