fuzz告警清理

Signed-off-by: lixiyuan <lixiyuan7@huawei.com>
This commit is contained in:
lixiyuan 2024-11-19 20:32:20 +08:00
parent 3471ad3146
commit 1c2900d4bd
4 changed files with 4 additions and 8 deletions

View File

@ -33,7 +33,6 @@ using namespace OHOS::StorageDaemon;
namespace OHOS {
constexpr uint8_t MAX_CALL_TRANSACTION = 32;
constexpr size_t U32_AT_SIZE = 4;
constexpr size_t FOO_MAX_LEN = 1024;
std::shared_ptr<StorageDaemon::StorageDaemon> storageDaemon = std::make_shared<StorageDaemon::StorageDaemon>();
std::shared_ptr<StorageDaemon::UserManager> userManager = StorageDaemon::UserManager::GetInstance();
@ -398,7 +397,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
}
/* Validate the length of size */
if (size < OHOS::U32_AT_SIZE || size > OHOS::FOO_MAX_LEN) {
if (size < OHOS::U32_AT_SIZE) {
return 0;
}

View File

@ -27,7 +27,6 @@
using namespace OHOS::StorageDaemon;
namespace OHOS {
constexpr size_t FOO_MAX_LEN = 1024;
constexpr size_t U32_AT_SIZE = 4;
std::shared_ptr<StorageDaemon::StorageDaemon> storageDaemon =
@ -63,7 +62,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
}
/* Validate the length of size */
if (size < OHOS::U32_AT_SIZE || size > OHOS::FOO_MAX_LEN) {
if (size < OHOS::U32_AT_SIZE) {
return 0;
}

View File

@ -27,7 +27,6 @@
using namespace OHOS::StorageDaemon;
namespace OHOS {
constexpr size_t FOO_MAX_LEN = 1024;
constexpr size_t U32_AT_SIZE = 4;
std::shared_ptr<StorageDaemon::StorageDaemon> storageDaemon =
@ -63,7 +62,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
}
/* Validate the length of size */
if (size < OHOS::U32_AT_SIZE || size > OHOS::FOO_MAX_LEN) {
if (size < OHOS::U32_AT_SIZE) {
return 0;
}

View File

@ -29,7 +29,6 @@
using namespace OHOS::StorageManager;
namespace OHOS::StorageManager {
constexpr size_t FOO_MAX_LEN = 1024;
constexpr uint8_t MAX_CALL_TRANSACTION = 64;
constexpr size_t U32_AT_SIZE = 4;
constexpr int32_t SERVICE_ID = 5003;
@ -341,7 +340,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
}
/* Validate the length of size */
if (size < OHOS::StorageManager::U32_AT_SIZE || size > OHOS::StorageManager::FOO_MAX_LEN) {
if (size < OHOS::StorageManager::U32_AT_SIZE) {
return 0;
}