修复fuzz静态告警问题

Signed-off-by: wlh2624 <1968860844@qq.com>
Change-Id: Iaa7549659f5b323de61a450f86ffd324fd6b64c6
This commit is contained in:
wlh2624
2024-11-11 16:23:51 +08:00
parent 4351889c4d
commit ba27bd78e5
365 changed files with 365 additions and 730 deletions
@@ -28,7 +28,6 @@ using namespace OHOS::AppExecFwk;
namespace OHOS {
namespace {
constexpr size_t FOO_MAX_LEN = 1024;
constexpr size_t U32_AT_SIZE = 4;
}
bool DoSomethingInterestingWithMyAPI(const char* data, size_t size)
@@ -56,7 +55,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
}
/* Validate the length of size */
if (size > OHOS::FOO_MAX_LEN || size < OHOS::U32_AT_SIZE) {
if (size < OHOS::U32_AT_SIZE) {
return 0;
}