diff --git a/test/fuzztest/abilityappdebuginfo_fuzzer/abilityappdebuginfo_fuzzer.cpp b/test/fuzztest/abilityappdebuginfo_fuzzer/abilityappdebuginfo_fuzzer.cpp index fac8dc9818..7a2ce28526 100644 --- a/test/fuzztest/abilityappdebuginfo_fuzzer/abilityappdebuginfo_fuzzer.cpp +++ b/test/fuzztest/abilityappdebuginfo_fuzzer/abilityappdebuginfo_fuzzer.cpp @@ -36,7 +36,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -73,7 +72,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; } diff --git a/test/fuzztest/abilityappdebugmanager_fuzzer/abilityappdebugmanager_fuzzer.cpp b/test/fuzztest/abilityappdebugmanager_fuzzer/abilityappdebugmanager_fuzzer.cpp index 57a31f3b02..222f55da4d 100644 --- a/test/fuzztest/abilityappdebugmanager_fuzzer/abilityappdebugmanager_fuzzer.cpp +++ b/test/fuzztest/abilityappdebugmanager_fuzzer/abilityappdebugmanager_fuzzer.cpp @@ -27,7 +27,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilityappdfrapplicationanrlistener_fuzzer/abilityappdfrapplicationanrlistener_fuzzer.cpp b/test/fuzztest/abilityappdfrapplicationanrlistener_fuzzer/abilityappdfrapplicationanrlistener_fuzzer.cpp index 14e956ff97..9fc978b402 100644 --- a/test/fuzztest/abilityappdfrapplicationanrlistener_fuzzer/abilityappdfrapplicationanrlistener_fuzzer.cpp +++ b/test/fuzztest/abilityappdfrapplicationanrlistener_fuzzer/abilityappdfrapplicationanrlistener_fuzzer.cpp @@ -30,7 +30,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -65,7 +64,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; } diff --git a/test/fuzztest/abilityappfreezemanager_fuzzer/abilityappfreezemanager_fuzzer.cpp b/test/fuzztest/abilityappfreezemanager_fuzzer/abilityappfreezemanager_fuzzer.cpp index 07152c1dbd..1d45bcf0b2 100644 --- a/test/fuzztest/abilityappfreezemanager_fuzzer/abilityappfreezemanager_fuzzer.cpp +++ b/test/fuzztest/abilityappfreezemanager_fuzzer/abilityappfreezemanager_fuzzer.cpp @@ -34,7 +34,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -99,7 +98,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; } diff --git a/test/fuzztest/abilityappjsheapmeminfo_fuzzer/abilityappjsheapmeminfo_fuzzer.cpp b/test/fuzztest/abilityappjsheapmeminfo_fuzzer/abilityappjsheapmeminfo_fuzzer.cpp index 9fc94a3322..ea36b7f169 100644 --- a/test/fuzztest/abilityappjsheapmeminfo_fuzzer/abilityappjsheapmeminfo_fuzzer.cpp +++ b/test/fuzztest/abilityappjsheapmeminfo_fuzzer/abilityappjsheapmeminfo_fuzzer.cpp @@ -33,7 +33,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -65,7 +64,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; } diff --git a/test/fuzztest/abilityappmgrapprunningmanager_fuzzer/abilityappmgrapprunningmanager_fuzzer.cpp b/test/fuzztest/abilityappmgrapprunningmanager_fuzzer/abilityappmgrapprunningmanager_fuzzer.cpp index 88c44318e8..e7d12e4a21 100644 --- a/test/fuzztest/abilityappmgrapprunningmanager_fuzzer/abilityappmgrapprunningmanager_fuzzer.cpp +++ b/test/fuzztest/abilityappmgrapprunningmanager_fuzzer/abilityappmgrapprunningmanager_fuzzer.cpp @@ -37,7 +37,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -227,7 +226,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; } diff --git a/test/fuzztest/abilityappmgrevent_fuzzer/abilityappmgrevent_fuzzer.cpp b/test/fuzztest/abilityappmgrevent_fuzzer/abilityappmgrevent_fuzzer.cpp index 3dd6eb315a..43cd484398 100644 --- a/test/fuzztest/abilityappmgrevent_fuzzer/abilityappmgrevent_fuzzer.cpp +++ b/test/fuzztest/abilityappmgrevent_fuzzer/abilityappmgrevent_fuzzer.cpp @@ -27,7 +27,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } @@ -68,7 +67,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; } diff --git a/test/fuzztest/abilityappmgrpagestatedata_fuzzer/abilityappmgrpagestatedata_fuzzer.cpp b/test/fuzztest/abilityappmgrpagestatedata_fuzzer/abilityappmgrpagestatedata_fuzzer.cpp index 0521edb5b5..6910d8b6bf 100644 --- a/test/fuzztest/abilityappmgrpagestatedata_fuzzer/abilityappmgrpagestatedata_fuzzer.cpp +++ b/test/fuzztest/abilityappmgrpagestatedata_fuzzer/abilityappmgrpagestatedata_fuzzer.cpp @@ -34,7 +34,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -82,7 +81,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; } diff --git a/test/fuzztest/abilityappmgrrenderstatedata_fuzzer/abilityappmgrrenderstatedata_fuzzer.cpp b/test/fuzztest/abilityappmgrrenderstatedata_fuzzer/abilityappmgrrenderstatedata_fuzzer.cpp index ddef5cf942..f6b29ca1b3 100644 --- a/test/fuzztest/abilityappmgrrenderstatedata_fuzzer/abilityappmgrrenderstatedata_fuzzer.cpp +++ b/test/fuzztest/abilityappmgrrenderstatedata_fuzzer/abilityappmgrrenderstatedata_fuzzer.cpp @@ -34,7 +34,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -82,7 +81,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; } diff --git a/test/fuzztest/abilityappmgrrenderstateobservermanager_fuzzer/abilityappmgrrenderstateobservermanager_fuzzer.cpp b/test/fuzztest/abilityappmgrrenderstateobservermanager_fuzzer/abilityappmgrrenderstateobservermanager_fuzzer.cpp index afec600c2e..93da0d28c8 100644 --- a/test/fuzztest/abilityappmgrrenderstateobservermanager_fuzzer/abilityappmgrrenderstateobservermanager_fuzzer.cpp +++ b/test/fuzztest/abilityappmgrrenderstateobservermanager_fuzzer/abilityappmgrrenderstateobservermanager_fuzzer.cpp @@ -39,7 +39,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -94,7 +93,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; } diff --git a/test/fuzztest/abilityappmgrrunningmultiinfo_fuzzer/abilityappmgrrunningmultiinfo_fuzzer.cpp b/test/fuzztest/abilityappmgrrunningmultiinfo_fuzzer/abilityappmgrrunningmultiinfo_fuzzer.cpp index 495bd2e3c6..8da1789dab 100644 --- a/test/fuzztest/abilityappmgrrunningmultiinfo_fuzzer/abilityappmgrrunningmultiinfo_fuzzer.cpp +++ b/test/fuzztest/abilityappmgrrunningmultiinfo_fuzzer/abilityappmgrrunningmultiinfo_fuzzer.cpp @@ -34,7 +34,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -82,7 +81,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; } diff --git a/test/fuzztest/abilityapppreloader_fuzzer/abilityapppreloader_fuzzer.cpp b/test/fuzztest/abilityapppreloader_fuzzer/abilityapppreloader_fuzzer.cpp index 235c944bc3..dcda01c184 100644 --- a/test/fuzztest/abilityapppreloader_fuzzer/abilityapppreloader_fuzzer.cpp +++ b/test/fuzztest/abilityapppreloader_fuzzer/abilityapppreloader_fuzzer.cpp @@ -37,7 +37,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -82,7 +81,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; } diff --git a/test/fuzztest/abilityattachtimeout_fuzzer/abilityattachtimeout_fuzzer.cpp b/test/fuzztest/abilityattachtimeout_fuzzer/abilityattachtimeout_fuzzer.cpp index dfc4f58dbe..c114c6d04b 100755 --- a/test/fuzztest/abilityattachtimeout_fuzzer/abilityattachtimeout_fuzzer.cpp +++ b/test/fuzztest/abilityattachtimeout_fuzzer/abilityattachtimeout_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } @@ -76,7 +75,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; } diff --git a/test/fuzztest/abilityautostartupclient_fuzzer/abilityautostartupclient_fuzzer.cpp b/test/fuzztest/abilityautostartupclient_fuzzer/abilityautostartupclient_fuzzer.cpp index 90b52a035b..801053735c 100644 --- a/test/fuzztest/abilityautostartupclient_fuzzer/abilityautostartupclient_fuzzer.cpp +++ b/test/fuzztest/abilityautostartupclient_fuzzer/abilityautostartupclient_fuzzer.cpp @@ -32,7 +32,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr uint8_t ENABLE = 2; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; @@ -80,7 +79,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; } diff --git a/test/fuzztest/abilityautostartupdatamanager_fuzzer/abilityautostartupdatamanager_fuzzer.cpp b/test/fuzztest/abilityautostartupdatamanager_fuzzer/abilityautostartupdatamanager_fuzzer.cpp index bbd9f3e50f..7baf75ac48 100644 --- a/test/fuzztest/abilityautostartupdatamanager_fuzzer/abilityautostartupdatamanager_fuzzer.cpp +++ b/test/fuzztest/abilityautostartupdatamanager_fuzzer/abilityautostartupdatamanager_fuzzer.cpp @@ -33,7 +33,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr uint8_t ENABLE = 2; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; @@ -93,7 +92,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; } diff --git a/test/fuzztest/abilityautostartupdatamanagera_fuzzer/abilityautostartupdatamanagera_fuzzer.cpp b/test/fuzztest/abilityautostartupdatamanagera_fuzzer/abilityautostartupdatamanagera_fuzzer.cpp index 19dfe7203e..80652ae91d 100755 --- a/test/fuzztest/abilityautostartupdatamanagera_fuzzer/abilityautostartupdatamanagera_fuzzer.cpp +++ b/test/fuzztest/abilityautostartupdatamanagera_fuzzer/abilityautostartupdatamanagera_fuzzer.cpp @@ -35,7 +35,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -157,7 +156,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; } diff --git a/test/fuzztest/abilityautostartupdatamanagerb_fuzzer/abilityautostartupdatamanagerb_fuzzer.cpp b/test/fuzztest/abilityautostartupdatamanagerb_fuzzer/abilityautostartupdatamanagerb_fuzzer.cpp index cec71166dc..286cd6c0b4 100755 --- a/test/fuzztest/abilityautostartupdatamanagerb_fuzzer/abilityautostartupdatamanagerb_fuzzer.cpp +++ b/test/fuzztest/abilityautostartupdatamanagerb_fuzzer/abilityautostartupdatamanagerb_fuzzer.cpp @@ -35,7 +35,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -133,7 +132,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; } diff --git a/test/fuzztest/abilityautostartupservicea_fuzzer/abilityautostartupservicea_fuzzer.cpp b/test/fuzztest/abilityautostartupservicea_fuzzer/abilityautostartupservicea_fuzzer.cpp index 866f3417d4..5f55fc19e0 100755 --- a/test/fuzztest/abilityautostartupservicea_fuzzer/abilityautostartupservicea_fuzzer.cpp +++ b/test/fuzztest/abilityautostartupservicea_fuzzer/abilityautostartupservicea_fuzzer.cpp @@ -35,7 +35,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -113,7 +112,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; } diff --git a/test/fuzztest/abilityautostartupserviceb_fuzzer/abilityautostartupserviceb_fuzzer.cpp b/test/fuzztest/abilityautostartupserviceb_fuzzer/abilityautostartupserviceb_fuzzer.cpp index a6282a3607..879cabbd24 100755 --- a/test/fuzztest/abilityautostartupserviceb_fuzzer/abilityautostartupserviceb_fuzzer.cpp +++ b/test/fuzztest/abilityautostartupserviceb_fuzzer/abilityautostartupserviceb_fuzzer.cpp @@ -36,7 +36,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -127,7 +126,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; } diff --git a/test/fuzztest/abilitybackgroundconnection_fuzzer/abilitybackgroundconnection_fuzzer.cpp b/test/fuzztest/abilitybackgroundconnection_fuzzer/abilitybackgroundconnection_fuzzer.cpp index 89e1925e6d..27f63794c0 100644 --- a/test/fuzztest/abilitybackgroundconnection_fuzzer/abilitybackgroundconnection_fuzzer.cpp +++ b/test/fuzztest/abilitybackgroundconnection_fuzzer/abilitybackgroundconnection_fuzzer.cpp @@ -30,7 +30,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr uint8_t ENABLE = 2; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; @@ -67,7 +66,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; } diff --git a/test/fuzztest/abilitycachemanagera_fuzzer/abilitycachemanagera_fuzzer.cpp b/test/fuzztest/abilitycachemanagera_fuzzer/abilitycachemanagera_fuzzer.cpp index 9971937d18..c2d08f1522 100755 --- a/test/fuzztest/abilitycachemanagera_fuzzer/abilitycachemanagera_fuzzer.cpp +++ b/test/fuzztest/abilitycachemanagera_fuzzer/abilitycachemanagera_fuzzer.cpp @@ -35,7 +35,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -134,7 +133,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; } diff --git a/test/fuzztest/abilitychildprocessinfo_fuzzer/abilitychildprocessinfo_fuzzer.cpp b/test/fuzztest/abilitychildprocessinfo_fuzzer/abilitychildprocessinfo_fuzzer.cpp index 5c26e7dc7e..52068a00ac 100644 --- a/test/fuzztest/abilitychildprocessinfo_fuzzer/abilitychildprocessinfo_fuzzer.cpp +++ b/test/fuzztest/abilitychildprocessinfo_fuzzer/abilitychildprocessinfo_fuzzer.cpp @@ -34,7 +34,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -71,7 +70,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; } diff --git a/test/fuzztest/abilitychildprocessrecord_fuzzer/abilitychildprocessrecord_fuzzer.cpp b/test/fuzztest/abilitychildprocessrecord_fuzzer/abilitychildprocessrecord_fuzzer.cpp index 34674107f8..a6c8153577 100644 --- a/test/fuzztest/abilitychildprocessrecord_fuzzer/abilitychildprocessrecord_fuzzer.cpp +++ b/test/fuzztest/abilitychildprocessrecord_fuzzer/abilitychildprocessrecord_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AppExecFwk; using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; } @@ -92,7 +91,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; } diff --git a/test/fuzztest/abilityconnectionstub_fuzzer/abilityconnectionstub_fuzzer.cpp b/test/fuzztest/abilityconnectionstub_fuzzer/abilityconnectionstub_fuzzer.cpp index d524f3db80..fc9245accb 100755 --- a/test/fuzztest/abilityconnectionstub_fuzzer/abilityconnectionstub_fuzzer.cpp +++ b/test/fuzztest/abilityconnectionstub_fuzzer/abilityconnectionstub_fuzzer.cpp @@ -30,7 +30,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -86,7 +85,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; } diff --git a/test/fuzztest/abilityconnectmanager_fuzzer/abilityconnectmanager_fuzzer.cpp b/test/fuzztest/abilityconnectmanager_fuzzer/abilityconnectmanager_fuzzer.cpp index a63302f31e..fe586a3e1a 100755 --- a/test/fuzztest/abilityconnectmanager_fuzzer/abilityconnectmanager_fuzzer.cpp +++ b/test/fuzztest/abilityconnectmanager_fuzzer/abilityconnectmanager_fuzzer.cpp @@ -33,7 +33,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr uint8_t ENABLE = 2; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; @@ -174,7 +173,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; } diff --git a/test/fuzztest/abilitycontext_fuzzer/abilitycontext_fuzzer.cpp b/test/fuzztest/abilitycontext_fuzzer/abilitycontext_fuzzer.cpp index 80802fa45e..6c05bb99d6 100644 --- a/test/fuzztest/abilitycontext_fuzzer/abilitycontext_fuzzer.cpp +++ b/test/fuzztest/abilitycontext_fuzzer/abilitycontext_fuzzer.cpp @@ -35,7 +35,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; constexpr size_t OFFSET_TWO = 8; @@ -139,7 +138,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; } diff --git a/test/fuzztest/abilitydebugdeal_fuzzer/abilitydebugdeal_fuzzer.cpp b/test/fuzztest/abilitydebugdeal_fuzzer/abilitydebugdeal_fuzzer.cpp index 3ec7aca18e..fab364681b 100644 --- a/test/fuzztest/abilitydebugdeal_fuzzer/abilitydebugdeal_fuzzer.cpp +++ b/test/fuzztest/abilitydebugdeal_fuzzer/abilitydebugdeal_fuzzer.cpp @@ -33,7 +33,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr uint8_t ENABLE = 2; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; @@ -103,7 +102,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; } diff --git a/test/fuzztest/abilitydebugresponseproxy_fuzzer/abilitydebugresponseproxy_fuzzer.cpp b/test/fuzztest/abilitydebugresponseproxy_fuzzer/abilitydebugresponseproxy_fuzzer.cpp index dd0b054718..a4de78c19f 100755 --- a/test/fuzztest/abilitydebugresponseproxy_fuzzer/abilitydebugresponseproxy_fuzzer.cpp +++ b/test/fuzztest/abilitydebugresponseproxy_fuzzer/abilitydebugresponseproxy_fuzzer.cpp @@ -35,7 +35,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -100,7 +99,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; } diff --git a/test/fuzztest/abilityeventhandler_fuzzer/abilityeventhandler_fuzzer.cpp b/test/fuzztest/abilityeventhandler_fuzzer/abilityeventhandler_fuzzer.cpp index 723d9819d1..25587e8dac 100755 --- a/test/fuzztest/abilityeventhandler_fuzzer/abilityeventhandler_fuzzer.cpp +++ b/test/fuzztest/abilityeventhandler_fuzzer/abilityeventhandler_fuzzer.cpp @@ -38,7 +38,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr int OFFSET_ZERO = 24; @@ -188,7 +187,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; } diff --git a/test/fuzztest/abilityeventutil_fuzzer/abilityeventutil_fuzzer.cpp b/test/fuzztest/abilityeventutil_fuzzer/abilityeventutil_fuzzer.cpp index fd6fe697e5..b92a6c6d6d 100644 --- a/test/fuzztest/abilityeventutil_fuzzer/abilityeventutil_fuzzer.cpp +++ b/test/fuzztest/abilityeventutil_fuzzer/abilityeventutil_fuzzer.cpp @@ -30,7 +30,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr uint8_t ENABLE = 2; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; @@ -65,7 +64,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; } diff --git a/test/fuzztest/abilityfirstframestateobservermanager_fuzzer/abilityfirstframestateobservermanager_fuzzer.cpp b/test/fuzztest/abilityfirstframestateobservermanager_fuzzer/abilityfirstframestateobservermanager_fuzzer.cpp index 326ad66bf8..72b919b2fa 100644 --- a/test/fuzztest/abilityfirstframestateobservermanager_fuzzer/abilityfirstframestateobservermanager_fuzzer.cpp +++ b/test/fuzztest/abilityfirstframestateobservermanager_fuzzer/abilityfirstframestateobservermanager_fuzzer.cpp @@ -32,7 +32,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr uint8_t ENABLE = 2; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; @@ -80,7 +79,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) return 0; } /* Validate the length of size */ - if (size > OHOS::FOO_MAX_LEN || size < OHOS::U32_AT_SIZE) { + if (size < OHOS::U32_AT_SIZE) { return 0; } char* ch = (char*)malloc(size + 1); diff --git a/test/fuzztest/abilityforegroundstateobserverproxy_fuzzer/abilityforegroundstateobserverproxy_fuzzer.cpp b/test/fuzztest/abilityforegroundstateobserverproxy_fuzzer/abilityforegroundstateobserverproxy_fuzzer.cpp index 0f50bf9882..51ee33de67 100644 --- a/test/fuzztest/abilityforegroundstateobserverproxy_fuzzer/abilityforegroundstateobserverproxy_fuzzer.cpp +++ b/test/fuzztest/abilityforegroundstateobserverproxy_fuzzer/abilityforegroundstateobserverproxy_fuzzer.cpp @@ -35,7 +35,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -74,7 +73,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; } diff --git a/test/fuzztest/abilityframeworkscjenvironment_fuzzer/abilityframeworkscjenvironment_fuzzer.cpp b/test/fuzztest/abilityframeworkscjenvironment_fuzzer/abilityframeworkscjenvironment_fuzzer.cpp index c09ee88c67..7566ee9404 100644 --- a/test/fuzztest/abilityframeworkscjenvironment_fuzzer/abilityframeworkscjenvironment_fuzzer.cpp +++ b/test/fuzztest/abilityframeworkscjenvironment_fuzzer/abilityframeworkscjenvironment_fuzzer.cpp @@ -34,7 +34,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -80,7 +79,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; } diff --git a/test/fuzztest/abilityframeworksnativejsworker_fuzzer/abilityframeworksnativejsworker_fuzzer.cpp b/test/fuzztest/abilityframeworksnativejsworker_fuzzer/abilityframeworksnativejsworker_fuzzer.cpp index 0d890c3032..836313e321 100644 --- a/test/fuzztest/abilityframeworksnativejsworker_fuzzer/abilityframeworksnativejsworker_fuzzer.cpp +++ b/test/fuzztest/abilityframeworksnativejsworker_fuzzer/abilityframeworksnativejsworker_fuzzer.cpp @@ -34,7 +34,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -106,7 +105,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; } diff --git a/test/fuzztest/abilityframeworksnativeohosjsenvlogger_fuzzer/abilityframeworksnativeohosjsenvlogger_fuzzer.cpp b/test/fuzztest/abilityframeworksnativeohosjsenvlogger_fuzzer/abilityframeworksnativeohosjsenvlogger_fuzzer.cpp index 4b2fae8ecb..58140998dc 100644 --- a/test/fuzztest/abilityframeworksnativeohosjsenvlogger_fuzzer/abilityframeworksnativeohosjsenvlogger_fuzzer.cpp +++ b/test/fuzztest/abilityframeworksnativeohosjsenvlogger_fuzzer/abilityframeworksnativeohosjsenvlogger_fuzzer.cpp @@ -33,7 +33,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -64,7 +63,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; } diff --git a/test/fuzztest/abilityinterfacesappmanageramsmgrstub_fuzzer/abilityinterfacesappmanageramsmgrstub_fuzzer.cpp b/test/fuzztest/abilityinterfacesappmanageramsmgrstub_fuzzer/abilityinterfacesappmanageramsmgrstub_fuzzer.cpp index 689cb472c5..05edbd463b 100644 --- a/test/fuzztest/abilityinterfacesappmanageramsmgrstub_fuzzer/abilityinterfacesappmanageramsmgrstub_fuzzer.cpp +++ b/test/fuzztest/abilityinterfacesappmanageramsmgrstub_fuzzer/abilityinterfacesappmanageramsmgrstub_fuzzer.cpp @@ -36,7 +36,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -92,7 +91,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; } diff --git a/test/fuzztest/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer.cpp b/test/fuzztest/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer.cpp index 2b68bca8be..5de6344e33 100644 --- a/test/fuzztest/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer.cpp +++ b/test/fuzztest/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer/abilityinterfacesappmgrabilitydebugresponseproxy_fuzzer.cpp @@ -36,7 +36,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -99,7 +98,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; } diff --git a/test/fuzztest/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer.cpp b/test/fuzztest/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer.cpp index cd85ad9ba1..64ceb3cd8b 100644 --- a/test/fuzztest/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer.cpp +++ b/test/fuzztest/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer/abilityinterfacesappmgrappdebuglistenerproxy_fuzzer.cpp @@ -36,7 +36,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -95,7 +94,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; } diff --git a/test/fuzztest/abilityinterfacesappmgrappdebuglistenerstub_fuzzer/abilityinterfacesappmgrappdebuglistenerstub_fuzzer.cpp b/test/fuzztest/abilityinterfacesappmgrappdebuglistenerstub_fuzzer/abilityinterfacesappmgrappdebuglistenerstub_fuzzer.cpp index 9664f664d2..7a6e74b039 100644 --- a/test/fuzztest/abilityinterfacesappmgrappdebuglistenerstub_fuzzer/abilityinterfacesappmgrappdebuglistenerstub_fuzzer.cpp +++ b/test/fuzztest/abilityinterfacesappmgrappdebuglistenerstub_fuzzer/abilityinterfacesappmgrappdebuglistenerstub_fuzzer.cpp @@ -36,7 +36,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -101,7 +100,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; } diff --git a/test/fuzztest/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer.cpp b/test/fuzztest/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer.cpp index fed703c2e1..a9bdf39fc6 100644 --- a/test/fuzztest/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer.cpp +++ b/test/fuzztest/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer/abilityinterfacesappmgrappforegroundstateobserverstub_fuzzer.cpp @@ -36,7 +36,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -106,7 +105,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; } diff --git a/test/fuzztest/abilityinterfacesappmgrchildschedulerproxy_fuzzer/abilityinterfacesappmgrchildschedulerproxy_fuzzer.cpp b/test/fuzztest/abilityinterfacesappmgrchildschedulerproxy_fuzzer/abilityinterfacesappmgrchildschedulerproxy_fuzzer.cpp index bcf5577014..dc10aaf1df 100644 --- a/test/fuzztest/abilityinterfacesappmgrchildschedulerproxy_fuzzer/abilityinterfacesappmgrchildschedulerproxy_fuzzer.cpp +++ b/test/fuzztest/abilityinterfacesappmgrchildschedulerproxy_fuzzer/abilityinterfacesappmgrchildschedulerproxy_fuzzer.cpp @@ -36,7 +36,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -92,7 +91,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; } diff --git a/test/fuzztest/abilityinterfacesappmgrchildschedulerstub_fuzzer/abilityinterfacesappmgrchildschedulerstub_fuzzer.cpp b/test/fuzztest/abilityinterfacesappmgrchildschedulerstub_fuzzer/abilityinterfacesappmgrchildschedulerstub_fuzzer.cpp index 78cf21b090..1813ffc089 100644 --- a/test/fuzztest/abilityinterfacesappmgrchildschedulerstub_fuzzer/abilityinterfacesappmgrchildschedulerstub_fuzzer.cpp +++ b/test/fuzztest/abilityinterfacesappmgrchildschedulerstub_fuzzer/abilityinterfacesappmgrchildschedulerstub_fuzzer.cpp @@ -36,7 +36,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -105,7 +104,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; } diff --git a/test/fuzztest/abilityinterfacesappmgrnativechildnotifyproxy_fuzzer/abilityinterfacesappmgrnativechildnotifyproxy_fuzzer.cpp b/test/fuzztest/abilityinterfacesappmgrnativechildnotifyproxy_fuzzer/abilityinterfacesappmgrnativechildnotifyproxy_fuzzer.cpp index 02f4aaafa6..6debe23f77 100644 --- a/test/fuzztest/abilityinterfacesappmgrnativechildnotifyproxy_fuzzer/abilityinterfacesappmgrnativechildnotifyproxy_fuzzer.cpp +++ b/test/fuzztest/abilityinterfacesappmgrnativechildnotifyproxy_fuzzer/abilityinterfacesappmgrnativechildnotifyproxy_fuzzer.cpp @@ -36,7 +36,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -102,7 +101,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; } diff --git a/test/fuzztest/abilityinterfacesappmgrnativechildnotifystub_fuzzer/abilityinterfacesappmgrnativechildnotifystub_fuzzer.cpp b/test/fuzztest/abilityinterfacesappmgrnativechildnotifystub_fuzzer/abilityinterfacesappmgrnativechildnotifystub_fuzzer.cpp index 28c4dd326a..9183e951a9 100644 --- a/test/fuzztest/abilityinterfacesappmgrnativechildnotifystub_fuzzer/abilityinterfacesappmgrnativechildnotifystub_fuzzer.cpp +++ b/test/fuzztest/abilityinterfacesappmgrnativechildnotifystub_fuzzer/abilityinterfacesappmgrnativechildnotifystub_fuzzer.cpp @@ -38,7 +38,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -104,7 +103,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; } diff --git a/test/fuzztest/abilityinterfacesappmgrrenderstateobserverstub_fuzzer/abilityinterfacesappmgrrenderstateobserverstub_fuzzer.cpp b/test/fuzztest/abilityinterfacesappmgrrenderstateobserverstub_fuzzer/abilityinterfacesappmgrrenderstateobserverstub_fuzzer.cpp index 45185994cb..16e6386323 100644 --- a/test/fuzztest/abilityinterfacesappmgrrenderstateobserverstub_fuzzer/abilityinterfacesappmgrrenderstateobserverstub_fuzzer.cpp +++ b/test/fuzztest/abilityinterfacesappmgrrenderstateobserverstub_fuzzer/abilityinterfacesappmgrrenderstateobserverstub_fuzzer.cpp @@ -35,7 +35,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -97,7 +96,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; } diff --git a/test/fuzztest/abilitymanagereventsubscriber_fuzzer/abilitymanagereventsubscriber_fuzzer.cpp b/test/fuzztest/abilitymanagereventsubscriber_fuzzer/abilitymanagereventsubscriber_fuzzer.cpp index c68a87c05b..7d9e383aa2 100644 --- a/test/fuzztest/abilitymanagereventsubscriber_fuzzer/abilitymanagereventsubscriber_fuzzer.cpp +++ b/test/fuzztest/abilitymanagereventsubscriber_fuzzer/abilitymanagereventsubscriber_fuzzer.cpp @@ -32,7 +32,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr uint8_t ENABLE = 2; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; @@ -70,7 +69,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; } diff --git a/test/fuzztest/abilitymanagerservicea_fuzzer/abilitymanagerservicea_fuzzer.cpp b/test/fuzztest/abilitymanagerservicea_fuzzer/abilitymanagerservicea_fuzzer.cpp index b6f4400e23..b6cd606b01 100755 --- a/test/fuzztest/abilitymanagerservicea_fuzzer/abilitymanagerservicea_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerservicea_fuzzer/abilitymanagerservicea_fuzzer.cpp @@ -35,7 +35,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -98,7 +97,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; } diff --git a/test/fuzztest/abilitymanagerserviceb_fuzzer/abilitymanagerserviceb_fuzzer.cpp b/test/fuzztest/abilitymanagerserviceb_fuzzer/abilitymanagerserviceb_fuzzer.cpp index 2844983fdd..836ef011db 100755 --- a/test/fuzztest/abilitymanagerserviceb_fuzzer/abilitymanagerserviceb_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerserviceb_fuzzer/abilitymanagerserviceb_fuzzer.cpp @@ -34,7 +34,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -74,7 +73,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; } diff --git a/test/fuzztest/abilitymanagerservicec_fuzzer/abilitymanagerservicec_fuzzer.cpp b/test/fuzztest/abilitymanagerservicec_fuzzer/abilitymanagerservicec_fuzzer.cpp index 7d274e5199..6aa83366a9 100755 --- a/test/fuzztest/abilitymanagerservicec_fuzzer/abilitymanagerservicec_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerservicec_fuzzer/abilitymanagerservicec_fuzzer.cpp @@ -34,7 +34,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -109,7 +108,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; } diff --git a/test/fuzztest/abilitymanagerserviced_fuzzer/abilitymanagerserviced_fuzzer.cpp b/test/fuzztest/abilitymanagerserviced_fuzzer/abilitymanagerserviced_fuzzer.cpp index 0c8d311813..79cbd994b8 100755 --- a/test/fuzztest/abilitymanagerserviced_fuzzer/abilitymanagerserviced_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerserviced_fuzzer/abilitymanagerserviced_fuzzer.cpp @@ -35,7 +35,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -92,7 +91,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; } diff --git a/test/fuzztest/abilitymanagerservicee_fuzzer/abilitymanagerservicee_fuzzer.cpp b/test/fuzztest/abilitymanagerservicee_fuzzer/abilitymanagerservicee_fuzzer.cpp index cb2240459f..d69539f481 100755 --- a/test/fuzztest/abilitymanagerservicee_fuzzer/abilitymanagerservicee_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerservicee_fuzzer/abilitymanagerservicee_fuzzer.cpp @@ -35,7 +35,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -99,7 +98,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; } diff --git a/test/fuzztest/abilitymanagerserviceeighth_fuzzer/abilitymanagerserviceeighth_fuzzer.cpp b/test/fuzztest/abilitymanagerserviceeighth_fuzzer/abilitymanagerserviceeighth_fuzzer.cpp index aa09407db9..9abcdea5a8 100755 --- a/test/fuzztest/abilitymanagerserviceeighth_fuzzer/abilitymanagerserviceeighth_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerserviceeighth_fuzzer/abilitymanagerserviceeighth_fuzzer.cpp @@ -35,7 +35,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -80,7 +79,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; } diff --git a/test/fuzztest/abilitymanagerservicef_fuzzer/abilitymanagerservicef_fuzzer.cpp b/test/fuzztest/abilitymanagerservicef_fuzzer/abilitymanagerservicef_fuzzer.cpp index c46ee463b4..f680876e19 100755 --- a/test/fuzztest/abilitymanagerservicef_fuzzer/abilitymanagerservicef_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerservicef_fuzzer/abilitymanagerservicef_fuzzer.cpp @@ -35,7 +35,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -107,7 +106,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; } diff --git a/test/fuzztest/abilitymanagerservicefifth_fuzzer/abilitymanagerservicefifth_fuzzer.cpp b/test/fuzztest/abilitymanagerservicefifth_fuzzer/abilitymanagerservicefifth_fuzzer.cpp index 41f8ee3d90..e72d4a048c 100755 --- a/test/fuzztest/abilitymanagerservicefifth_fuzzer/abilitymanagerservicefifth_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerservicefifth_fuzzer/abilitymanagerservicefifth_fuzzer.cpp @@ -36,7 +36,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr int OFFSET_ZERO = 24; constexpr int OFFSET_ONE = 16; @@ -111,7 +110,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; } diff --git a/test/fuzztest/abilitymanagerservicefirst_fuzzer/abilitymanagerservicefirst_fuzzer.cpp b/test/fuzztest/abilitymanagerservicefirst_fuzzer/abilitymanagerservicefirst_fuzzer.cpp index 934fdcf3b6..1923ade199 100755 --- a/test/fuzztest/abilitymanagerservicefirst_fuzzer/abilitymanagerservicefirst_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerservicefirst_fuzzer/abilitymanagerservicefirst_fuzzer.cpp @@ -36,7 +36,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -192,7 +191,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; } diff --git a/test/fuzztest/abilitymanagerservicefourth_fuzzer/abilitymanagerservicefourth_fuzzer.cpp b/test/fuzztest/abilitymanagerservicefourth_fuzzer/abilitymanagerservicefourth_fuzzer.cpp index 2e7731f507..38aa64a990 100755 --- a/test/fuzztest/abilitymanagerservicefourth_fuzzer/abilitymanagerservicefourth_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerservicefourth_fuzzer/abilitymanagerservicefourth_fuzzer.cpp @@ -35,7 +35,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -88,7 +87,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; } diff --git a/test/fuzztest/abilitymanagerserviceg_fuzzer/abilitymanagerserviceg_fuzzer.cpp b/test/fuzztest/abilitymanagerserviceg_fuzzer/abilitymanagerserviceg_fuzzer.cpp index c3803d0533..f37b63b232 100755 --- a/test/fuzztest/abilitymanagerserviceg_fuzzer/abilitymanagerserviceg_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerserviceg_fuzzer/abilitymanagerserviceg_fuzzer.cpp @@ -34,7 +34,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -103,7 +102,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; } diff --git a/test/fuzztest/abilitymanagerserviceh_fuzzer/abilitymanagerserviceh_fuzzer.cpp b/test/fuzztest/abilitymanagerserviceh_fuzzer/abilitymanagerserviceh_fuzzer.cpp index 69543314f2..333c5c27bd 100755 --- a/test/fuzztest/abilitymanagerserviceh_fuzzer/abilitymanagerserviceh_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerserviceh_fuzzer/abilitymanagerserviceh_fuzzer.cpp @@ -35,7 +35,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr int OFFSET_ZERO = 24; constexpr int OFFSET_ONE = 16; @@ -86,7 +85,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; } diff --git a/test/fuzztest/abilitymanagerserviceninth_fuzzer/abilitymanagerserviceninth_fuzzer.cpp b/test/fuzztest/abilitymanagerserviceninth_fuzzer/abilitymanagerserviceninth_fuzzer.cpp index 6933a00c86..e4f59d453a 100755 --- a/test/fuzztest/abilitymanagerserviceninth_fuzzer/abilitymanagerserviceninth_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerserviceninth_fuzzer/abilitymanagerserviceninth_fuzzer.cpp @@ -33,7 +33,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -76,7 +75,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; } diff --git a/test/fuzztest/abilitymanagerservicesecond_fuzzer/abilitymanagerservicesecond_fuzzer.cpp b/test/fuzztest/abilitymanagerservicesecond_fuzzer/abilitymanagerservicesecond_fuzzer.cpp index a5d978d454..9769cab010 100755 --- a/test/fuzztest/abilitymanagerservicesecond_fuzzer/abilitymanagerservicesecond_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerservicesecond_fuzzer/abilitymanagerservicesecond_fuzzer.cpp @@ -34,7 +34,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -152,7 +151,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; } diff --git a/test/fuzztest/abilitymanagerserviceseventh_fuzzer/abilitymanagerserviceseventh_fuzzer.cpp b/test/fuzztest/abilitymanagerserviceseventh_fuzzer/abilitymanagerserviceseventh_fuzzer.cpp index c816b13209..7dcd91cb0a 100755 --- a/test/fuzztest/abilitymanagerserviceseventh_fuzzer/abilitymanagerserviceseventh_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerserviceseventh_fuzzer/abilitymanagerserviceseventh_fuzzer.cpp @@ -35,7 +35,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -122,7 +121,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; } diff --git a/test/fuzztest/abilitymanagerservicesixth_fuzzer/abilitymanagerservicesixth_fuzzer.cpp b/test/fuzztest/abilitymanagerservicesixth_fuzzer/abilitymanagerservicesixth_fuzzer.cpp index a15a5e8e9a..0ef00f3c45 100755 --- a/test/fuzztest/abilitymanagerservicesixth_fuzzer/abilitymanagerservicesixth_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerservicesixth_fuzzer/abilitymanagerservicesixth_fuzzer.cpp @@ -35,7 +35,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -104,7 +103,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; } diff --git a/test/fuzztest/abilitymanagerservicetenth_fuzzer/abilitymanagerservicetenth_fuzzer.cpp b/test/fuzztest/abilitymanagerservicetenth_fuzzer/abilitymanagerservicetenth_fuzzer.cpp index 62b52c4178..08e81e2b6a 100755 --- a/test/fuzztest/abilitymanagerservicetenth_fuzzer/abilitymanagerservicetenth_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerservicetenth_fuzzer/abilitymanagerservicetenth_fuzzer.cpp @@ -34,7 +34,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -92,7 +91,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; } diff --git a/test/fuzztest/abilitymanagerservicethird_fuzzer/abilitymanagerservicethird_fuzzer.cpp b/test/fuzztest/abilitymanagerservicethird_fuzzer/abilitymanagerservicethird_fuzzer.cpp index db741cc5c0..f88c07b1a9 100755 --- a/test/fuzztest/abilitymanagerservicethird_fuzzer/abilitymanagerservicethird_fuzzer.cpp +++ b/test/fuzztest/abilitymanagerservicethird_fuzzer/abilitymanagerservicethird_fuzzer.cpp @@ -36,7 +36,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -98,7 +97,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; } diff --git a/test/fuzztest/abilitymemorylevelinfo_fuzzer/abilitymemorylevelinfo_fuzzer.cpp b/test/fuzztest/abilitymemorylevelinfo_fuzzer/abilitymemorylevelinfo_fuzzer.cpp index af0c925e02..fb1f30bdb2 100644 --- a/test/fuzztest/abilitymemorylevelinfo_fuzzer/abilitymemorylevelinfo_fuzzer.cpp +++ b/test/fuzztest/abilitymemorylevelinfo_fuzzer/abilitymemorylevelinfo_fuzzer.cpp @@ -36,7 +36,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -74,7 +73,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; } diff --git a/test/fuzztest/abilitymgrabilitymanagerstub_fuzzer/abilitymgrabilitymanagerstub_fuzzer.cpp b/test/fuzztest/abilitymgrabilitymanagerstub_fuzzer/abilitymgrabilitymanagerstub_fuzzer.cpp index bb4e9821f3..976bb3cb9b 100644 --- a/test/fuzztest/abilitymgrabilitymanagerstub_fuzzer/abilitymgrabilitymanagerstub_fuzzer.cpp +++ b/test/fuzztest/abilitymgrabilitymanagerstub_fuzzer/abilitymgrabilitymanagerstub_fuzzer.cpp @@ -34,7 +34,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -96,7 +95,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; } diff --git a/test/fuzztest/abilitymgrappexitreasonhelper_fuzzer/abilitymgrappexitreasonhelper_fuzzer.cpp b/test/fuzztest/abilitymgrappexitreasonhelper_fuzzer/abilitymgrappexitreasonhelper_fuzzer.cpp index d5e95fc987..cbb7e51e2c 100644 --- a/test/fuzztest/abilitymgrappexitreasonhelper_fuzzer/abilitymgrappexitreasonhelper_fuzzer.cpp +++ b/test/fuzztest/abilitymgrappexitreasonhelper_fuzzer/abilitymgrappexitreasonhelper_fuzzer.cpp @@ -35,7 +35,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -101,7 +100,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; } diff --git a/test/fuzztest/abilitymgrcontrolinterceptor_fuzzer/abilitymgrcontrolinterceptor_fuzzer.cpp b/test/fuzztest/abilitymgrcontrolinterceptor_fuzzer/abilitymgrcontrolinterceptor_fuzzer.cpp index 15c4895ae0..1c7a2a41a8 100644 --- a/test/fuzztest/abilitymgrcontrolinterceptor_fuzzer/abilitymgrcontrolinterceptor_fuzzer.cpp +++ b/test/fuzztest/abilitymgrcontrolinterceptor_fuzzer/abilitymgrcontrolinterceptor_fuzzer.cpp @@ -34,7 +34,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -91,7 +90,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; } diff --git a/test/fuzztest/abilitymgrdisposedruleinterceptor_fuzzer/abilitymgrdisposedruleinterceptor_fuzzer.cpp b/test/fuzztest/abilitymgrdisposedruleinterceptor_fuzzer/abilitymgrdisposedruleinterceptor_fuzzer.cpp index d2d452331e..4ace31bd87 100644 --- a/test/fuzztest/abilitymgrdisposedruleinterceptor_fuzzer/abilitymgrdisposedruleinterceptor_fuzzer.cpp +++ b/test/fuzztest/abilitymgrdisposedruleinterceptor_fuzzer/abilitymgrdisposedruleinterceptor_fuzzer.cpp @@ -35,7 +35,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -102,7 +101,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; } diff --git a/test/fuzztest/abilitymgrecologicalruleinterceptor_fuzzer/abilitymgrecologicalruleinterceptor_fuzzer.cpp b/test/fuzztest/abilitymgrecologicalruleinterceptor_fuzzer/abilitymgrecologicalruleinterceptor_fuzzer.cpp index b73c8daa7e..855384b4ad 100644 --- a/test/fuzztest/abilitymgrecologicalruleinterceptor_fuzzer/abilitymgrecologicalruleinterceptor_fuzzer.cpp +++ b/test/fuzztest/abilitymgrecologicalruleinterceptor_fuzzer/abilitymgrecologicalruleinterceptor_fuzzer.cpp @@ -35,7 +35,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -100,7 +99,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; } diff --git a/test/fuzztest/abilitymgrecologicalrulemgrserviceparam_fuzzer/abilitymgrecologicalrulemgrserviceparam_fuzzer.cpp b/test/fuzztest/abilitymgrecologicalrulemgrserviceparam_fuzzer/abilitymgrecologicalrulemgrserviceparam_fuzzer.cpp index 61a47e3548..fdb635d736 100644 --- a/test/fuzztest/abilitymgrecologicalrulemgrserviceparam_fuzzer/abilitymgrecologicalrulemgrserviceparam_fuzzer.cpp +++ b/test/fuzztest/abilitymgrecologicalrulemgrserviceparam_fuzzer/abilitymgrecologicalrulemgrserviceparam_fuzzer.cpp @@ -34,7 +34,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -71,7 +70,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; } diff --git a/test/fuzztest/abilitymgrextensionrecord_fuzzer/abilitymgrextensionrecord_fuzzer.cpp b/test/fuzztest/abilitymgrextensionrecord_fuzzer/abilitymgrextensionrecord_fuzzer.cpp index 914f031865..1482f2b0e6 100644 --- a/test/fuzztest/abilitymgrextensionrecord_fuzzer/abilitymgrextensionrecord_fuzzer.cpp +++ b/test/fuzztest/abilitymgrextensionrecord_fuzzer/abilitymgrextensionrecord_fuzzer.cpp @@ -34,7 +34,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -92,7 +91,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; } diff --git a/test/fuzztest/abilitymgrinsightintentexecutemanager_fuzzer/abilitymgrinsightintentexecutemanager_fuzzer.cpp b/test/fuzztest/abilitymgrinsightintentexecutemanager_fuzzer/abilitymgrinsightintentexecutemanager_fuzzer.cpp index f691072e03..76d8b14f35 100644 --- a/test/fuzztest/abilitymgrinsightintentexecutemanager_fuzzer/abilitymgrinsightintentexecutemanager_fuzzer.cpp +++ b/test/fuzztest/abilitymgrinsightintentexecutemanager_fuzzer/abilitymgrinsightintentexecutemanager_fuzzer.cpp @@ -35,7 +35,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -117,7 +116,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; } diff --git a/test/fuzztest/abilitymgrinsightintentexecuteresult_fuzzer/abilitymgrinsightintentexecuteresult_fuzzer.cpp b/test/fuzztest/abilitymgrinsightintentexecuteresult_fuzzer/abilitymgrinsightintentexecuteresult_fuzzer.cpp index 89293190b3..646e7eddba 100644 --- a/test/fuzztest/abilitymgrinsightintentexecuteresult_fuzzer/abilitymgrinsightintentexecuteresult_fuzzer.cpp +++ b/test/fuzztest/abilitymgrinsightintentexecuteresult_fuzzer/abilitymgrinsightintentexecuteresult_fuzzer.cpp @@ -35,7 +35,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -85,7 +84,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; } diff --git a/test/fuzztest/abilitymgrinsightintentutils_fuzzer/abilitymgrinsightintentutils_fuzzer.cpp b/test/fuzztest/abilitymgrinsightintentutils_fuzzer/abilitymgrinsightintentutils_fuzzer.cpp index 5e44ffc5da..bedd054d68 100644 --- a/test/fuzztest/abilitymgrinsightintentutils_fuzzer/abilitymgrinsightintentutils_fuzzer.cpp +++ b/test/fuzztest/abilitymgrinsightintentutils_fuzzer/abilitymgrinsightintentutils_fuzzer.cpp @@ -35,7 +35,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -87,7 +86,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; } diff --git a/test/fuzztest/abilitymgrinterceptorexecuter_fuzzer/abilitymgrinterceptorexecuter_fuzzer.cpp b/test/fuzztest/abilitymgrinterceptorexecuter_fuzzer/abilitymgrinterceptorexecuter_fuzzer.cpp index a18df49acd..d6dc73787a 100644 --- a/test/fuzztest/abilitymgrinterceptorexecuter_fuzzer/abilitymgrinterceptorexecuter_fuzzer.cpp +++ b/test/fuzztest/abilitymgrinterceptorexecuter_fuzzer/abilitymgrinterceptorexecuter_fuzzer.cpp @@ -34,7 +34,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -94,7 +93,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; } diff --git a/test/fuzztest/abilitymgrjumpinterceptor_fuzzer/abilitymgrjumpinterceptor_fuzzer.cpp b/test/fuzztest/abilitymgrjumpinterceptor_fuzzer/abilitymgrjumpinterceptor_fuzzer.cpp index 4448c55f38..c39cd2ff65 100644 --- a/test/fuzztest/abilitymgrjumpinterceptor_fuzzer/abilitymgrjumpinterceptor_fuzzer.cpp +++ b/test/fuzztest/abilitymgrjumpinterceptor_fuzzer/abilitymgrjumpinterceptor_fuzzer.cpp @@ -35,7 +35,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -97,7 +96,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; } diff --git a/test/fuzztest/abilitymgrpreloaduiextstateobserver_fuzzer/abilitymgrpreloaduiextstateobserver_fuzzer.cpp b/test/fuzztest/abilitymgrpreloaduiextstateobserver_fuzzer/abilitymgrpreloaduiextstateobserver_fuzzer.cpp index d7b0d96575..ed2573c393 100644 --- a/test/fuzztest/abilitymgrpreloaduiextstateobserver_fuzzer/abilitymgrpreloaduiextstateobserver_fuzzer.cpp +++ b/test/fuzztest/abilitymgrpreloaduiextstateobserver_fuzzer/abilitymgrpreloaduiextstateobserver_fuzzer.cpp @@ -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; } // namespace @@ -53,7 +52,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; } diff --git a/test/fuzztest/abilitymgrrdbparserutil_fuzzer/abilitymgrrdbparserutil_fuzzer.cpp b/test/fuzztest/abilitymgrrdbparserutil_fuzzer/abilitymgrrdbparserutil_fuzzer.cpp index f4d0ccd269..dc32bf857f 100644 --- a/test/fuzztest/abilitymgrrdbparserutil_fuzzer/abilitymgrrdbparserutil_fuzzer.cpp +++ b/test/fuzztest/abilitymgrrdbparserutil_fuzzer/abilitymgrrdbparserutil_fuzzer.cpp @@ -35,7 +35,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -89,7 +88,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; } diff --git a/test/fuzztest/abilitymgrrest_fuzzer/abilitymgrrest_fuzzer.cpp b/test/fuzztest/abilitymgrrest_fuzzer/abilitymgrrest_fuzzer.cpp index 9bd9e84a60..db7ff7aa49 100755 --- a/test/fuzztest/abilitymgrrest_fuzzer/abilitymgrrest_fuzzer.cpp +++ b/test/fuzztest/abilitymgrrest_fuzzer/abilitymgrrest_fuzzer.cpp @@ -35,7 +35,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -82,7 +81,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; } diff --git a/test/fuzztest/abilitymgrrestartappmanager_fuzzer/abilitymgrrestartappmanager_fuzzer.cpp b/test/fuzztest/abilitymgrrestartappmanager_fuzzer/abilitymgrrestartappmanager_fuzzer.cpp index 8ab6a7c8a6..8636e9baf9 100644 --- a/test/fuzztest/abilitymgrrestartappmanager_fuzzer/abilitymgrrestartappmanager_fuzzer.cpp +++ b/test/fuzztest/abilitymgrrestartappmanager_fuzzer/abilitymgrrestartappmanager_fuzzer.cpp @@ -32,7 +32,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -71,7 +70,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; } diff --git a/test/fuzztest/abilitymgruiextensionrecord_fuzzer/abilitymgruiextensionrecord_fuzzer.cpp b/test/fuzztest/abilitymgruiextensionrecord_fuzzer/abilitymgruiextensionrecord_fuzzer.cpp index f992af99e5..3ecd40061d 100644 --- a/test/fuzztest/abilitymgruiextensionrecord_fuzzer/abilitymgruiextensionrecord_fuzzer.cpp +++ b/test/fuzztest/abilitymgruiextensionrecord_fuzzer/abilitymgruiextensionrecord_fuzzer.cpp @@ -34,7 +34,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -95,7 +94,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; } diff --git a/test/fuzztest/abilitymgruiextensionsessioninfo_fuzzer/abilitymgruiextensionsessioninfo_fuzzer.cpp b/test/fuzztest/abilitymgruiextensionsessioninfo_fuzzer/abilitymgruiextensionsessioninfo_fuzzer.cpp index 2fb0f2f45d..e1e09e52bc 100644 --- a/test/fuzztest/abilitymgruiextensionsessioninfo_fuzzer/abilitymgruiextensionsessioninfo_fuzzer.cpp +++ b/test/fuzztest/abilitymgruiextensionsessioninfo_fuzzer/abilitymgruiextensionsessioninfo_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AbilityRuntime; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } // namespace @@ -51,7 +50,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; } diff --git a/test/fuzztest/abilityrunningrecord_fuzzer/abilityrunningrecord_fuzzer.cpp b/test/fuzztest/abilityrunningrecord_fuzzer/abilityrunningrecord_fuzzer.cpp index d5afb01384..07d4f96851 100644 --- a/test/fuzztest/abilityrunningrecord_fuzzer/abilityrunningrecord_fuzzer.cpp +++ b/test/fuzztest/abilityrunningrecord_fuzzer/abilityrunningrecord_fuzzer.cpp @@ -31,7 +31,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -103,7 +102,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; } diff --git a/test/fuzztest/abilityschedulerstub_fuzzer/abilityschedulerstub_fuzzer.cpp b/test/fuzztest/abilityschedulerstub_fuzzer/abilityschedulerstub_fuzzer.cpp index a86db63462..2f96c07aaa 100755 --- a/test/fuzztest/abilityschedulerstub_fuzzer/abilityschedulerstub_fuzzer.cpp +++ b/test/fuzztest/abilityschedulerstub_fuzzer/abilityschedulerstub_fuzzer.cpp @@ -30,7 +30,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -193,7 +192,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; } diff --git a/test/fuzztest/abilitystubabilityrecovery_fuzzer/abilitystubabilityrecovery_fuzzer.cpp b/test/fuzztest/abilitystubabilityrecovery_fuzzer/abilitystubabilityrecovery_fuzzer.cpp index 0536894492..f801e54e0e 100644 --- a/test/fuzztest/abilitystubabilityrecovery_fuzzer/abilitystubabilityrecovery_fuzzer.cpp +++ b/test/fuzztest/abilitystubabilityrecovery_fuzzer/abilitystubabilityrecovery_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubabilityrecoveryenable_fuzzer/abilitystubabilityrecoveryenable_fuzzer.cpp b/test/fuzztest/abilitystubabilityrecoveryenable_fuzzer/abilitystubabilityrecoveryenable_fuzzer.cpp index b230b13b54..99109d2e3f 100644 --- a/test/fuzztest/abilitystubabilityrecoveryenable_fuzzer/abilitystubabilityrecoveryenable_fuzzer.cpp +++ b/test/fuzztest/abilitystubabilityrecoveryenable_fuzzer/abilitystubabilityrecoveryenable_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubabilitytransitiondone_fuzzer/abilitystubabilitytransitiondone_fuzzer.cpp b/test/fuzztest/abilitystubabilitytransitiondone_fuzzer/abilitystubabilitytransitiondone_fuzzer.cpp index af8a421e41..1dff78ea11 100644 --- a/test/fuzztest/abilitystubabilitytransitiondone_fuzzer/abilitystubabilitytransitiondone_fuzzer.cpp +++ b/test/fuzztest/abilitystubabilitytransitiondone_fuzzer/abilitystubabilitytransitiondone_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubacquiredataability_fuzzer/abilitystubacquiredataability_fuzzer.cpp b/test/fuzztest/abilitystubacquiredataability_fuzzer/abilitystubacquiredataability_fuzzer.cpp index 84521a68b5..a1c4677751 100644 --- a/test/fuzztest/abilitystubacquiredataability_fuzzer/abilitystubacquiredataability_fuzzer.cpp +++ b/test/fuzztest/abilitystubacquiredataability_fuzzer/abilitystubacquiredataability_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubacquiresharedata_fuzzer/abilitystubacquiresharedata_fuzzer.cpp b/test/fuzztest/abilitystubacquiresharedata_fuzzer/abilitystubacquiresharedata_fuzzer.cpp index b03987c486..41bdd26906 100644 --- a/test/fuzztest/abilitystubacquiresharedata_fuzzer/abilitystubacquiresharedata_fuzzer.cpp +++ b/test/fuzztest/abilitystubacquiresharedata_fuzzer/abilitystubacquiresharedata_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubaddfreeinstallobserver_fuzzer/abilitystubaddfreeinstallobserver_fuzzer.cpp b/test/fuzztest/abilitystubaddfreeinstallobserver_fuzzer/abilitystubaddfreeinstallobserver_fuzzer.cpp index 87aa6ccc13..2b11f97fb1 100644 --- a/test/fuzztest/abilitystubaddfreeinstallobserver_fuzzer/abilitystubaddfreeinstallobserver_fuzzer.cpp +++ b/test/fuzztest/abilitystubaddfreeinstallobserver_fuzzer/abilitystubaddfreeinstallobserver_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubattachabilitythread_fuzzer/abilitystubattachabilitythread_fuzzer.cpp b/test/fuzztest/abilitystubattachabilitythread_fuzzer/abilitystubattachabilitythread_fuzzer.cpp index e207d66b51..c24d9779ab 100644 --- a/test/fuzztest/abilitystubattachabilitythread_fuzzer/abilitystubattachabilitythread_fuzzer.cpp +++ b/test/fuzztest/abilitystubattachabilitythread_fuzzer/abilitystubattachabilitythread_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubcallrequestdone_fuzzer/abilitystubcallrequestdone_fuzzer.cpp b/test/fuzztest/abilitystubcallrequestdone_fuzzer/abilitystubcallrequestdone_fuzzer.cpp index 77e0d7cfc1..e838b19f4e 100644 --- a/test/fuzztest/abilitystubcallrequestdone_fuzzer/abilitystubcallrequestdone_fuzzer.cpp +++ b/test/fuzztest/abilitystubcallrequestdone_fuzzer/abilitystubcallrequestdone_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubcalluiabilitybyscb_fuzzer/abilitystubcalluiabilitybyscb_fuzzer.cpp b/test/fuzztest/abilitystubcalluiabilitybyscb_fuzzer/abilitystubcalluiabilitybyscb_fuzzer.cpp index d6224b65ab..0adf25eba9 100644 --- a/test/fuzztest/abilitystubcalluiabilitybyscb_fuzzer/abilitystubcalluiabilitybyscb_fuzzer.cpp +++ b/test/fuzztest/abilitystubcalluiabilitybyscb_fuzzer/abilitystubcalluiabilitybyscb_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubcancelwantsender_fuzzer/abilitystubcancelwantsender_fuzzer.cpp b/test/fuzztest/abilitystubcancelwantsender_fuzzer/abilitystubcancelwantsender_fuzzer.cpp index 68a8b8600a..47e2c98edb 100644 --- a/test/fuzztest/abilitystubcancelwantsender_fuzzer/abilitystubcancelwantsender_fuzzer.cpp +++ b/test/fuzztest/abilitystubcancelwantsender_fuzzer/abilitystubcancelwantsender_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubcheckuiextensionisfocused_fuzzer/abilitystubcheckuiextensionisfocused_fuzzer.cpp b/test/fuzztest/abilitystubcheckuiextensionisfocused_fuzzer/abilitystubcheckuiextensionisfocused_fuzzer.cpp index 0d2a0baaf7..f4ac3d8688 100644 --- a/test/fuzztest/abilitystubcheckuiextensionisfocused_fuzzer/abilitystubcheckuiextensionisfocused_fuzzer.cpp +++ b/test/fuzztest/abilitystubcheckuiextensionisfocused_fuzzer/abilitystubcheckuiextensionisfocused_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubcleanallmissions_fuzzer/abilitystubcleanallmissions_fuzzer.cpp b/test/fuzztest/abilitystubcleanallmissions_fuzzer/abilitystubcleanallmissions_fuzzer.cpp index 5a8f0e3ca8..a7d7f1771a 100644 --- a/test/fuzztest/abilitystubcleanallmissions_fuzzer/abilitystubcleanallmissions_fuzzer.cpp +++ b/test/fuzztest/abilitystubcleanallmissions_fuzzer/abilitystubcleanallmissions_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubcleanmission_fuzzer/abilitystubcleanmission_fuzzer.cpp b/test/fuzztest/abilitystubcleanmission_fuzzer/abilitystubcleanmission_fuzzer.cpp index eb41668484..a38ee0d3ba 100644 --- a/test/fuzztest/abilitystubcleanmission_fuzzer/abilitystubcleanmission_fuzzer.cpp +++ b/test/fuzztest/abilitystubcleanmission_fuzzer/abilitystubcleanmission_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubcloseuiabilitybyscb_fuzzer/abilitystubcloseuiabilitybyscb_fuzzer.cpp b/test/fuzztest/abilitystubcloseuiabilitybyscb_fuzzer/abilitystubcloseuiabilitybyscb_fuzzer.cpp index 37eab5acba..3ffdfea699 100644 --- a/test/fuzztest/abilitystubcloseuiabilitybyscb_fuzzer/abilitystubcloseuiabilitybyscb_fuzzer.cpp +++ b/test/fuzztest/abilitystubcloseuiabilitybyscb_fuzzer/abilitystubcloseuiabilitybyscb_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubcommandabilitydone_fuzzer/abilitystubcommandabilitydone_fuzzer.cpp b/test/fuzztest/abilitystubcommandabilitydone_fuzzer/abilitystubcommandabilitydone_fuzzer.cpp index 35d00b90a6..5819e1452a 100644 --- a/test/fuzztest/abilitystubcommandabilitydone_fuzzer/abilitystubcommandabilitydone_fuzzer.cpp +++ b/test/fuzztest/abilitystubcommandabilitydone_fuzzer/abilitystubcommandabilitydone_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubcommandabilitywindowdone_fuzzer/abilitystubcommandabilitywindowdone_fuzzer.cpp b/test/fuzztest/abilitystubcommandabilitywindowdone_fuzzer/abilitystubcommandabilitywindowdone_fuzzer.cpp index 051e62b5a5..acfb3af96f 100644 --- a/test/fuzztest/abilitystubcommandabilitywindowdone_fuzzer/abilitystubcommandabilitywindowdone_fuzzer.cpp +++ b/test/fuzztest/abilitystubcommandabilitywindowdone_fuzzer/abilitystubcommandabilitywindowdone_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubcompletefirstframedrawing_fuzzer/abilitystubcompletefirstframedrawing_fuzzer.cpp b/test/fuzztest/abilitystubcompletefirstframedrawing_fuzzer/abilitystubcompletefirstframedrawing_fuzzer.cpp index 17a87f4bbd..0aaa6c2bb0 100644 --- a/test/fuzztest/abilitystubcompletefirstframedrawing_fuzzer/abilitystubcompletefirstframedrawing_fuzzer.cpp +++ b/test/fuzztest/abilitystubcompletefirstframedrawing_fuzzer/abilitystubcompletefirstframedrawing_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubconnectability_fuzzer/abilitystubconnectability_fuzzer.cpp b/test/fuzztest/abilitystubconnectability_fuzzer/abilitystubconnectability_fuzzer.cpp index 330fc2488e..40f13f72bd 100644 --- a/test/fuzztest/abilitystubconnectability_fuzzer/abilitystubconnectability_fuzzer.cpp +++ b/test/fuzztest/abilitystubconnectability_fuzzer/abilitystubconnectability_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubconnectabilitydone_fuzzer/abilitystubconnectabilitydone_fuzzer.cpp b/test/fuzztest/abilitystubconnectabilitydone_fuzzer/abilitystubconnectabilitydone_fuzzer.cpp index a248d259e1..dc696a1f22 100644 --- a/test/fuzztest/abilitystubconnectabilitydone_fuzzer/abilitystubconnectabilitydone_fuzzer.cpp +++ b/test/fuzztest/abilitystubconnectabilitydone_fuzzer/abilitystubconnectabilitydone_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubconnectabilitywithtype_fuzzer/abilitystubconnectabilitywithtype_fuzzer.cpp b/test/fuzztest/abilitystubconnectabilitywithtype_fuzzer/abilitystubconnectabilitywithtype_fuzzer.cpp index d87d323fed..0d4fb26e16 100644 --- a/test/fuzztest/abilitystubconnectabilitywithtype_fuzzer/abilitystubconnectabilitywithtype_fuzzer.cpp +++ b/test/fuzztest/abilitystubconnectabilitywithtype_fuzzer/abilitystubconnectabilitywithtype_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubconnectuiextensionability_fuzzer/abilitystubconnectuiextensionability_fuzzer.cpp b/test/fuzztest/abilitystubconnectuiextensionability_fuzzer/abilitystubconnectuiextensionability_fuzzer.cpp index 1054845b4c..7a20167717 100644 --- a/test/fuzztest/abilitystubconnectuiextensionability_fuzzer/abilitystubconnectuiextensionability_fuzzer.cpp +++ b/test/fuzztest/abilitystubconnectuiextensionability_fuzzer/abilitystubconnectuiextensionability_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubcontinueability_fuzzer/abilitystubcontinueability_fuzzer.cpp b/test/fuzztest/abilitystubcontinueability_fuzzer/abilitystubcontinueability_fuzzer.cpp index 223674ab47..399ba5371e 100644 --- a/test/fuzztest/abilitystubcontinueability_fuzzer/abilitystubcontinueability_fuzzer.cpp +++ b/test/fuzztest/abilitystubcontinueability_fuzzer/abilitystubcontinueability_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubcontinuemission_fuzzer/abilitystubcontinuemission_fuzzer.cpp b/test/fuzztest/abilitystubcontinuemission_fuzzer/abilitystubcontinuemission_fuzzer.cpp index 54100dbfdf..dd31f16ce1 100644 --- a/test/fuzztest/abilitystubcontinuemission_fuzzer/abilitystubcontinuemission_fuzzer.cpp +++ b/test/fuzztest/abilitystubcontinuemission_fuzzer/abilitystubcontinuemission_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubcontinuemissionofbundlename_fuzzer/abilitystubcontinuemissionofbundlename_fuzzer.cpp b/test/fuzztest/abilitystubcontinuemissionofbundlename_fuzzer/abilitystubcontinuemissionofbundlename_fuzzer.cpp index f23267263d..5e3803691b 100644 --- a/test/fuzztest/abilitystubcontinuemissionofbundlename_fuzzer/abilitystubcontinuemissionofbundlename_fuzzer.cpp +++ b/test/fuzztest/abilitystubcontinuemissionofbundlename_fuzzer/abilitystubcontinuemissionofbundlename_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubdelegatordoabilitybackground_fuzzer/abilitystubdelegatordoabilitybackground_fuzzer.cpp b/test/fuzztest/abilitystubdelegatordoabilitybackground_fuzzer/abilitystubdelegatordoabilitybackground_fuzzer.cpp index d7942c267c..bf277d5bd1 100644 --- a/test/fuzztest/abilitystubdelegatordoabilitybackground_fuzzer/abilitystubdelegatordoabilitybackground_fuzzer.cpp +++ b/test/fuzztest/abilitystubdelegatordoabilitybackground_fuzzer/abilitystubdelegatordoabilitybackground_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubdelegatordoabilityforeground_fuzzer/abilitystubdelegatordoabilityforeground_fuzzer.cpp b/test/fuzztest/abilitystubdelegatordoabilityforeground_fuzzer/abilitystubdelegatordoabilityforeground_fuzzer.cpp index ff92f8f093..4f92964419 100644 --- a/test/fuzztest/abilitystubdelegatordoabilityforeground_fuzzer/abilitystubdelegatordoabilityforeground_fuzzer.cpp +++ b/test/fuzztest/abilitystubdelegatordoabilityforeground_fuzzer/abilitystubdelegatordoabilityforeground_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubdisconnectability_fuzzer/abilitystubdisconnectability_fuzzer.cpp b/test/fuzztest/abilitystubdisconnectability_fuzzer/abilitystubdisconnectability_fuzzer.cpp index 88bc125686..01cf24ccef 100644 --- a/test/fuzztest/abilitystubdisconnectability_fuzzer/abilitystubdisconnectability_fuzzer.cpp +++ b/test/fuzztest/abilitystubdisconnectability_fuzzer/abilitystubdisconnectability_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubdisconnectabilitydone_fuzzer/abilitystubdisconnectabilitydone_fuzzer.cpp b/test/fuzztest/abilitystubdisconnectabilitydone_fuzzer/abilitystubdisconnectabilitydone_fuzzer.cpp index b23c1d5322..5a169708d7 100644 --- a/test/fuzztest/abilitystubdisconnectabilitydone_fuzzer/abilitystubdisconnectabilitydone_fuzzer.cpp +++ b/test/fuzztest/abilitystubdisconnectabilitydone_fuzzer/abilitystubdisconnectabilitydone_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubdoabilitybackground_fuzzer/abilitystubdoabilitybackground_fuzzer.cpp b/test/fuzztest/abilitystubdoabilitybackground_fuzzer/abilitystubdoabilitybackground_fuzzer.cpp index 7ecb7e571c..1a7ffd8a5b 100644 --- a/test/fuzztest/abilitystubdoabilitybackground_fuzzer/abilitystubdoabilitybackground_fuzzer.cpp +++ b/test/fuzztest/abilitystubdoabilitybackground_fuzzer/abilitystubdoabilitybackground_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubdoabilityforeground_fuzzer/abilitystubdoabilityforeground_fuzzer.cpp b/test/fuzztest/abilitystubdoabilityforeground_fuzzer/abilitystubdoabilityforeground_fuzzer.cpp index 9b39bc9691..771a5146eb 100644 --- a/test/fuzztest/abilitystubdoabilityforeground_fuzzer/abilitystubdoabilityforeground_fuzzer.cpp +++ b/test/fuzztest/abilitystubdoabilityforeground_fuzzer/abilitystubdoabilityforeground_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubdumpabilityinfodone_fuzzer/abilitystubdumpabilityinfodone_fuzzer.cpp b/test/fuzztest/abilitystubdumpabilityinfodone_fuzzer/abilitystubdumpabilityinfodone_fuzzer.cpp index 46f5a45a82..0692a0a3d0 100644 --- a/test/fuzztest/abilitystubdumpabilityinfodone_fuzzer/abilitystubdumpabilityinfodone_fuzzer.cpp +++ b/test/fuzztest/abilitystubdumpabilityinfodone_fuzzer/abilitystubdumpabilityinfodone_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubdumpstate_fuzzer/abilitystubdumpstate_fuzzer.cpp b/test/fuzztest/abilitystubdumpstate_fuzzer/abilitystubdumpstate_fuzzer.cpp index b4b9d33a22..166bb5cb7e 100644 --- a/test/fuzztest/abilitystubdumpstate_fuzzer/abilitystubdumpstate_fuzzer.cpp +++ b/test/fuzztest/abilitystubdumpstate_fuzzer/abilitystubdumpstate_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -65,7 +64,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; } diff --git a/test/fuzztest/abilitystubdumpsysstate_fuzzer/abilitystubdumpsysstate_fuzzer.cpp b/test/fuzztest/abilitystubdumpsysstate_fuzzer/abilitystubdumpsysstate_fuzzer.cpp index 224e38f043..5e376c406a 100644 --- a/test/fuzztest/abilitystubdumpsysstate_fuzzer/abilitystubdumpsysstate_fuzzer.cpp +++ b/test/fuzztest/abilitystubdumpsysstate_fuzzer/abilitystubdumpsysstate_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubfinishusertest_fuzzer/abilitystubfinishusertest_fuzzer.cpp b/test/fuzztest/abilitystubfinishusertest_fuzzer/abilitystubfinishusertest_fuzzer.cpp index d066cb42ab..097e02bda3 100644 --- a/test/fuzztest/abilitystubfinishusertest_fuzzer/abilitystubfinishusertest_fuzzer.cpp +++ b/test/fuzztest/abilitystubfinishusertest_fuzzer/abilitystubfinishusertest_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubforceexitapp_fuzzer/abilitystubforceexitapp_fuzzer.cpp b/test/fuzztest/abilitystubforceexitapp_fuzzer/abilitystubforceexitapp_fuzzer.cpp index ac3236a5ad..068b8fba76 100644 --- a/test/fuzztest/abilitystubforceexitapp_fuzzer/abilitystubforceexitapp_fuzzer.cpp +++ b/test/fuzztest/abilitystubforceexitapp_fuzzer/abilitystubforceexitapp_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubfreeinstallabilityfromremote_fuzzer/abilitystubfreeinstallabilityfromremote_fuzzer.cpp b/test/fuzztest/abilitystubfreeinstallabilityfromremote_fuzzer/abilitystubfreeinstallabilityfromremote_fuzzer.cpp index a85902fe55..ac1f447ff1 100644 --- a/test/fuzztest/abilitystubfreeinstallabilityfromremote_fuzzer/abilitystubfreeinstallabilityfromremote_fuzzer.cpp +++ b/test/fuzztest/abilitystubfreeinstallabilityfromremote_fuzzer/abilitystubfreeinstallabilityfromremote_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubgetabilityrunninginfo_fuzzer/abilitystubgetabilityrunninginfo_fuzzer.cpp b/test/fuzztest/abilitystubgetabilityrunninginfo_fuzzer/abilitystubgetabilityrunninginfo_fuzzer.cpp index 45d7432f4c..380b43ee0e 100644 --- a/test/fuzztest/abilitystubgetabilityrunninginfo_fuzzer/abilitystubgetabilityrunninginfo_fuzzer.cpp +++ b/test/fuzztest/abilitystubgetabilityrunninginfo_fuzzer/abilitystubgetabilityrunninginfo_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubgetabilitystatebypersistentid_fuzzer/abilitystubgetabilitystatebypersistentid_fuzzer.cpp b/test/fuzztest/abilitystubgetabilitystatebypersistentid_fuzzer/abilitystubgetabilitystatebypersistentid_fuzzer.cpp index 7e36e8cd04..822e819df4 100644 --- a/test/fuzztest/abilitystubgetabilitystatebypersistentid_fuzzer/abilitystubgetabilitystatebypersistentid_fuzzer.cpp +++ b/test/fuzztest/abilitystubgetabilitystatebypersistentid_fuzzer/abilitystubgetabilitystatebypersistentid_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubgetabilitytoken_fuzzer/abilitystubgetabilitytoken_fuzzer.cpp b/test/fuzztest/abilitystubgetabilitytoken_fuzzer/abilitystubgetabilitytoken_fuzzer.cpp index 25b3f49de1..321210f9ce 100644 --- a/test/fuzztest/abilitystubgetabilitytoken_fuzzer/abilitystubgetabilitytoken_fuzzer.cpp +++ b/test/fuzztest/abilitystubgetabilitytoken_fuzzer/abilitystubgetabilitytoken_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubgetappmemorysize_fuzzer/abilitystubgetappmemorysize_fuzzer.cpp b/test/fuzztest/abilitystubgetappmemorysize_fuzzer/abilitystubgetappmemorysize_fuzzer.cpp index 9b44928443..8c5b250a11 100644 --- a/test/fuzztest/abilitystubgetappmemorysize_fuzzer/abilitystubgetappmemorysize_fuzzer.cpp +++ b/test/fuzztest/abilitystubgetappmemorysize_fuzzer/abilitystubgetappmemorysize_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubgetdlpconnectioninfos_fuzzer/abilitystubgetdlpconnectioninfos_fuzzer.cpp b/test/fuzztest/abilitystubgetdlpconnectioninfos_fuzzer/abilitystubgetdlpconnectioninfos_fuzzer.cpp index f584365c3b..e392f2b678 100644 --- a/test/fuzztest/abilitystubgetdlpconnectioninfos_fuzzer/abilitystubgetdlpconnectioninfos_fuzzer.cpp +++ b/test/fuzztest/abilitystubgetdlpconnectioninfos_fuzzer/abilitystubgetdlpconnectioninfos_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -67,7 +66,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; } diff --git a/test/fuzztest/abilitystubgetelementnamebytoken_fuzzer/abilitystubgetelementnamebytoken_fuzzer.cpp b/test/fuzztest/abilitystubgetelementnamebytoken_fuzzer/abilitystubgetelementnamebytoken_fuzzer.cpp index 4cbd2eb020..81a9dd304b 100644 --- a/test/fuzztest/abilitystubgetelementnamebytoken_fuzzer/abilitystubgetelementnamebytoken_fuzzer.cpp +++ b/test/fuzztest/abilitystubgetelementnamebytoken_fuzzer/abilitystubgetelementnamebytoken_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubgetextensionrunninginfo_fuzzer/abilitystubgetextensionrunninginfo_fuzzer.cpp b/test/fuzztest/abilitystubgetextensionrunninginfo_fuzzer/abilitystubgetextensionrunninginfo_fuzzer.cpp index e7ddcb37d2..43907dc904 100644 --- a/test/fuzztest/abilitystubgetextensionrunninginfo_fuzzer/abilitystubgetextensionrunninginfo_fuzzer.cpp +++ b/test/fuzztest/abilitystubgetextensionrunninginfo_fuzzer/abilitystubgetextensionrunninginfo_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubgetmissionidbytoken_fuzzer/abilitystubgetmissionidbytoken_fuzzer.cpp b/test/fuzztest/abilitystubgetmissionidbytoken_fuzzer/abilitystubgetmissionidbytoken_fuzzer.cpp index 743376663d..5dbee99fdf 100644 --- a/test/fuzztest/abilitystubgetmissionidbytoken_fuzzer/abilitystubgetmissionidbytoken_fuzzer.cpp +++ b/test/fuzztest/abilitystubgetmissionidbytoken_fuzzer/abilitystubgetmissionidbytoken_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubgetmissioninfo_fuzzer/abilitystubgetmissioninfo_fuzzer.cpp b/test/fuzztest/abilitystubgetmissioninfo_fuzzer/abilitystubgetmissioninfo_fuzzer.cpp index 95402837c4..40fc04940d 100644 --- a/test/fuzztest/abilitystubgetmissioninfo_fuzzer/abilitystubgetmissioninfo_fuzzer.cpp +++ b/test/fuzztest/abilitystubgetmissioninfo_fuzzer/abilitystubgetmissioninfo_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubgetmissioninfos_fuzzer/abilitystubgetmissioninfos_fuzzer.cpp b/test/fuzztest/abilitystubgetmissioninfos_fuzzer/abilitystubgetmissioninfos_fuzzer.cpp index da4db4cf07..a9a77d61f7 100644 --- a/test/fuzztest/abilitystubgetmissioninfos_fuzzer/abilitystubgetmissioninfos_fuzzer.cpp +++ b/test/fuzztest/abilitystubgetmissioninfos_fuzzer/abilitystubgetmissioninfos_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubgetmissionsnapshotinfo_fuzzer/abilitystubgetmissionsnapshotinfo_fuzzer.cpp b/test/fuzztest/abilitystubgetmissionsnapshotinfo_fuzzer/abilitystubgetmissionsnapshotinfo_fuzzer.cpp index 4dbc0be4f1..2a3bcc4ccb 100644 --- a/test/fuzztest/abilitystubgetmissionsnapshotinfo_fuzzer/abilitystubgetmissionsnapshotinfo_fuzzer.cpp +++ b/test/fuzztest/abilitystubgetmissionsnapshotinfo_fuzzer/abilitystubgetmissionsnapshotinfo_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubgetpendingrequestwant_fuzzer/abilitystubgetpendingrequestwant_fuzzer.cpp b/test/fuzztest/abilitystubgetpendingrequestwant_fuzzer/abilitystubgetpendingrequestwant_fuzzer.cpp index 90796cb9ea..b450a1c6d7 100644 --- a/test/fuzztest/abilitystubgetpendingrequestwant_fuzzer/abilitystubgetpendingrequestwant_fuzzer.cpp +++ b/test/fuzztest/abilitystubgetpendingrequestwant_fuzzer/abilitystubgetpendingrequestwant_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubgetpendingwantbundlename_fuzzer/abilitystubgetpendingwantbundlename_fuzzer.cpp b/test/fuzztest/abilitystubgetpendingwantbundlename_fuzzer/abilitystubgetpendingwantbundlename_fuzzer.cpp index 09a80e2246..2fe6e7201d 100644 --- a/test/fuzztest/abilitystubgetpendingwantbundlename_fuzzer/abilitystubgetpendingwantbundlename_fuzzer.cpp +++ b/test/fuzztest/abilitystubgetpendingwantbundlename_fuzzer/abilitystubgetpendingwantbundlename_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubgetpendingwantcode_fuzzer/abilitystubgetpendingwantcode_fuzzer.cpp b/test/fuzztest/abilitystubgetpendingwantcode_fuzzer/abilitystubgetpendingwantcode_fuzzer.cpp index 4fdc2c1975..1bc794316f 100644 --- a/test/fuzztest/abilitystubgetpendingwantcode_fuzzer/abilitystubgetpendingwantcode_fuzzer.cpp +++ b/test/fuzztest/abilitystubgetpendingwantcode_fuzzer/abilitystubgetpendingwantcode_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubgetpendingwanttype_fuzzer/abilitystubgetpendingwanttype_fuzzer.cpp b/test/fuzztest/abilitystubgetpendingwanttype_fuzzer/abilitystubgetpendingwanttype_fuzzer.cpp index b521853d4f..2222a5c134 100644 --- a/test/fuzztest/abilitystubgetpendingwanttype_fuzzer/abilitystubgetpendingwanttype_fuzzer.cpp +++ b/test/fuzztest/abilitystubgetpendingwanttype_fuzzer/abilitystubgetpendingwanttype_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubgetpendingwantuid_fuzzer/abilitystubgetpendingwantuid_fuzzer.cpp b/test/fuzztest/abilitystubgetpendingwantuid_fuzzer/abilitystubgetpendingwantuid_fuzzer.cpp index 02c97c3a24..5dea48895f 100644 --- a/test/fuzztest/abilitystubgetpendingwantuid_fuzzer/abilitystubgetpendingwantuid_fuzzer.cpp +++ b/test/fuzztest/abilitystubgetpendingwantuid_fuzzer/abilitystubgetpendingwantuid_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubgetpendingwantuserid_fuzzer/abilitystubgetpendingwantuserid_fuzzer.cpp b/test/fuzztest/abilitystubgetpendingwantuserid_fuzzer/abilitystubgetpendingwantuserid_fuzzer.cpp index 4fbd0d836f..c8b4525c4f 100644 --- a/test/fuzztest/abilitystubgetpendingwantuserid_fuzzer/abilitystubgetpendingwantuserid_fuzzer.cpp +++ b/test/fuzztest/abilitystubgetpendingwantuserid_fuzzer/abilitystubgetpendingwantuserid_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubgetprocessrunninginfo_fuzzer/abilitystubgetprocessrunninginfo_fuzzer.cpp b/test/fuzztest/abilitystubgetprocessrunninginfo_fuzzer/abilitystubgetprocessrunninginfo_fuzzer.cpp index 795fa37c3d..6430986551 100644 --- a/test/fuzztest/abilitystubgetprocessrunninginfo_fuzzer/abilitystubgetprocessrunninginfo_fuzzer.cpp +++ b/test/fuzztest/abilitystubgetprocessrunninginfo_fuzzer/abilitystubgetprocessrunninginfo_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubgettopability_fuzzer/abilitystubgettopability_fuzzer.cpp b/test/fuzztest/abilitystubgettopability_fuzzer/abilitystubgettopability_fuzzer.cpp index 49e2cc2237..c408785630 100644 --- a/test/fuzztest/abilitystubgettopability_fuzzer/abilitystubgettopability_fuzzer.cpp +++ b/test/fuzztest/abilitystubgettopability_fuzzer/abilitystubgettopability_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubgettopabilitytoken_fuzzer/abilitystubgettopabilitytoken_fuzzer.cpp b/test/fuzztest/abilitystubgettopabilitytoken_fuzzer/abilitystubgettopabilitytoken_fuzzer.cpp index 23042e0830..8e89ece777 100644 --- a/test/fuzztest/abilitystubgettopabilitytoken_fuzzer/abilitystubgettopabilitytoken_fuzzer.cpp +++ b/test/fuzztest/abilitystubgettopabilitytoken_fuzzer/abilitystubgettopabilitytoken_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubgetwantsender_fuzzer/abilitystubgetwantsender_fuzzer.cpp b/test/fuzztest/abilitystubgetwantsender_fuzzer/abilitystubgetwantsender_fuzzer.cpp index 941eecb22c..355dce4732 100644 --- a/test/fuzztest/abilitystubgetwantsender_fuzzer/abilitystubgetwantsender_fuzzer.cpp +++ b/test/fuzztest/abilitystubgetwantsender_fuzzer/abilitystubgetwantsender_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubgetwantsendinfo_fuzzer/abilitystubgetwantsendinfo_fuzzer.cpp b/test/fuzztest/abilitystubgetwantsendinfo_fuzzer/abilitystubgetwantsendinfo_fuzzer.cpp index a5848d13dc..3548b786d5 100644 --- a/test/fuzztest/abilitystubgetwantsendinfo_fuzzer/abilitystubgetwantsendinfo_fuzzer.cpp +++ b/test/fuzztest/abilitystubgetwantsendinfo_fuzzer/abilitystubgetwantsendinfo_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubinterface_fuzzer/abilitystubinterface_fuzzer.cpp b/test/fuzztest/abilitystubinterface_fuzzer/abilitystubinterface_fuzzer.cpp index 94d4caa591..654313293d 100644 --- a/test/fuzztest/abilitystubinterface_fuzzer/abilitystubinterface_fuzzer.cpp +++ b/test/fuzztest/abilitystubinterface_fuzzer/abilitystubinterface_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -64,7 +63,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; } diff --git a/test/fuzztest/abilitystubisramconstraineddevice_fuzzer/abilitystubisramconstraineddevice_fuzzer.cpp b/test/fuzztest/abilitystubisramconstraineddevice_fuzzer/abilitystubisramconstraineddevice_fuzzer.cpp index 188164fdfd..b540e1540c 100644 --- a/test/fuzztest/abilitystubisramconstraineddevice_fuzzer/abilitystubisramconstraineddevice_fuzzer.cpp +++ b/test/fuzztest/abilitystubisramconstraineddevice_fuzzer/abilitystubisramconstraineddevice_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubisrunninginstabilitytest_fuzzer/abilitystubisrunninginstabilitytest_fuzzer.cpp b/test/fuzztest/abilitystubisrunninginstabilitytest_fuzzer/abilitystubisrunninginstabilitytest_fuzzer.cpp index 1a389d7fef..47e9b395a2 100644 --- a/test/fuzztest/abilitystubisrunninginstabilitytest_fuzzer/abilitystubisrunninginstabilitytest_fuzzer.cpp +++ b/test/fuzztest/abilitystubisrunninginstabilitytest_fuzzer/abilitystubisrunninginstabilitytest_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubkillprocess_fuzzer/abilitystubkillprocess_fuzzer.cpp b/test/fuzztest/abilitystubkillprocess_fuzzer/abilitystubkillprocess_fuzzer.cpp index 5a4825e051..a315ed0756 100644 --- a/test/fuzztest/abilitystubkillprocess_fuzzer/abilitystubkillprocess_fuzzer.cpp +++ b/test/fuzztest/abilitystubkillprocess_fuzzer/abilitystubkillprocess_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystublockmissionforcleanup_fuzzer/abilitystublockmissionforcleanup_fuzzer.cpp b/test/fuzztest/abilitystublockmissionforcleanup_fuzzer/abilitystublockmissionforcleanup_fuzzer.cpp index 3b67acaa55..f61bffa1cf 100644 --- a/test/fuzztest/abilitystublockmissionforcleanup_fuzzer/abilitystublockmissionforcleanup_fuzzer.cpp +++ b/test/fuzztest/abilitystublockmissionforcleanup_fuzzer/abilitystublockmissionforcleanup_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubminimizeability_fuzzer/abilitystubminimizeability_fuzzer.cpp b/test/fuzztest/abilitystubminimizeability_fuzzer/abilitystubminimizeability_fuzzer.cpp index e03a560450..89132b6301 100644 --- a/test/fuzztest/abilitystubminimizeability_fuzzer/abilitystubminimizeability_fuzzer.cpp +++ b/test/fuzztest/abilitystubminimizeability_fuzzer/abilitystubminimizeability_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubminimizeuiabilitybyscb_fuzzer/abilitystubminimizeuiabilitybyscb_fuzzer.cpp b/test/fuzztest/abilitystubminimizeuiabilitybyscb_fuzzer/abilitystubminimizeuiabilitybyscb_fuzzer.cpp index 8dcf3e7fdc..56dc3cff5f 100644 --- a/test/fuzztest/abilitystubminimizeuiabilitybyscb_fuzzer/abilitystubminimizeuiabilitybyscb_fuzzer.cpp +++ b/test/fuzztest/abilitystubminimizeuiabilitybyscb_fuzzer/abilitystubminimizeuiabilitybyscb_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubminimizeuiextensionability_fuzzer/abilitystubminimizeuiextensionability_fuzzer.cpp b/test/fuzztest/abilitystubminimizeuiextensionability_fuzzer/abilitystubminimizeuiextensionability_fuzzer.cpp index 2b74724002..c04f53e664 100644 --- a/test/fuzztest/abilitystubminimizeuiextensionability_fuzzer/abilitystubminimizeuiextensionability_fuzzer.cpp +++ b/test/fuzztest/abilitystubminimizeuiextensionability_fuzzer/abilitystubminimizeuiextensionability_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubmoveabilitytobackground_fuzzer/abilitystubmoveabilitytobackground_fuzzer.cpp b/test/fuzztest/abilitystubmoveabilitytobackground_fuzzer/abilitystubmoveabilitytobackground_fuzzer.cpp index abbc8a9dcf..67e2527136 100644 --- a/test/fuzztest/abilitystubmoveabilitytobackground_fuzzer/abilitystubmoveabilitytobackground_fuzzer.cpp +++ b/test/fuzztest/abilitystubmoveabilitytobackground_fuzzer/abilitystubmoveabilitytobackground_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubmovemissionstobackground_fuzzer/abilitystubmovemissionstobackground_fuzzer.cpp b/test/fuzztest/abilitystubmovemissionstobackground_fuzzer/abilitystubmovemissionstobackground_fuzzer.cpp index 3f1c9d7b23..2945d118c1 100644 --- a/test/fuzztest/abilitystubmovemissionstobackground_fuzzer/abilitystubmovemissionstobackground_fuzzer.cpp +++ b/test/fuzztest/abilitystubmovemissionstobackground_fuzzer/abilitystubmovemissionstobackground_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubmovemissionstoforeground_fuzzer/abilitystubmovemissionstoforeground_fuzzer.cpp b/test/fuzztest/abilitystubmovemissionstoforeground_fuzzer/abilitystubmovemissionstoforeground_fuzzer.cpp index 5ca710ff85..c8a2fbe7e6 100644 --- a/test/fuzztest/abilitystubmovemissionstoforeground_fuzzer/abilitystubmovemissionstoforeground_fuzzer.cpp +++ b/test/fuzztest/abilitystubmovemissionstoforeground_fuzzer/abilitystubmovemissionstoforeground_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubmovemissiontofront_fuzzer/abilitystubmovemissiontofront_fuzzer.cpp b/test/fuzztest/abilitystubmovemissiontofront_fuzzer/abilitystubmovemissiontofront_fuzzer.cpp index 96795adef8..6624aef370 100644 --- a/test/fuzztest/abilitystubmovemissiontofront_fuzzer/abilitystubmovemissiontofront_fuzzer.cpp +++ b/test/fuzztest/abilitystubmovemissiontofront_fuzzer/abilitystubmovemissiontofront_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubmovemissiontofrontbyoptions_fuzzer/abilitystubmovemissiontofrontbyoptions_fuzzer.cpp b/test/fuzztest/abilitystubmovemissiontofrontbyoptions_fuzzer/abilitystubmovemissiontofrontbyoptions_fuzzer.cpp index 6a9a4cd968..a0a4e61955 100644 --- a/test/fuzztest/abilitystubmovemissiontofrontbyoptions_fuzzer/abilitystubmovemissiontofrontbyoptions_fuzzer.cpp +++ b/test/fuzztest/abilitystubmovemissiontofrontbyoptions_fuzzer/abilitystubmovemissiontofrontbyoptions_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubnotifycompletecontinuation_fuzzer/abilitystubnotifycompletecontinuation_fuzzer.cpp b/test/fuzztest/abilitystubnotifycompletecontinuation_fuzzer/abilitystubnotifycompletecontinuation_fuzzer.cpp index 22c8b86db0..4ef8d3c837 100644 --- a/test/fuzztest/abilitystubnotifycompletecontinuation_fuzzer/abilitystubnotifycompletecontinuation_fuzzer.cpp +++ b/test/fuzztest/abilitystubnotifycompletecontinuation_fuzzer/abilitystubnotifycompletecontinuation_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubnotifycontinuationresult_fuzzer/abilitystubnotifycontinuationresult_fuzzer.cpp b/test/fuzztest/abilitystubnotifycontinuationresult_fuzzer/abilitystubnotifycontinuationresult_fuzzer.cpp index ef687bba09..26bb55b6d0 100644 --- a/test/fuzztest/abilitystubnotifycontinuationresult_fuzzer/abilitystubnotifycontinuationresult_fuzzer.cpp +++ b/test/fuzztest/abilitystubnotifycontinuationresult_fuzzer/abilitystubnotifycontinuationresult_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubnotifysaveasresult_fuzzer/abilitystubnotifysaveasresult_fuzzer.cpp b/test/fuzztest/abilitystubnotifysaveasresult_fuzzer/abilitystubnotifysaveasresult_fuzzer.cpp index f897bcc760..f89d2e6ba7 100644 --- a/test/fuzztest/abilitystubnotifysaveasresult_fuzzer/abilitystubnotifysaveasresult_fuzzer.cpp +++ b/test/fuzztest/abilitystubnotifysaveasresult_fuzzer/abilitystubnotifysaveasresult_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubprepareterminateability_fuzzer/abilitystubprepareterminateability_fuzzer.cpp b/test/fuzztest/abilitystubprepareterminateability_fuzzer/abilitystubprepareterminateability_fuzzer.cpp index bc8b92b527..4234c4812a 100644 --- a/test/fuzztest/abilitystubprepareterminateability_fuzzer/abilitystubprepareterminateability_fuzzer.cpp +++ b/test/fuzztest/abilitystubprepareterminateability_fuzzer/abilitystubprepareterminateability_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubquerymissionvaild_fuzzer/abilitystubquerymissionvaild_fuzzer.cpp b/test/fuzztest/abilitystubquerymissionvaild_fuzzer/abilitystubquerymissionvaild_fuzzer.cpp index 7d6fa7559f..d18bd03657 100644 --- a/test/fuzztest/abilitystubquerymissionvaild_fuzzer/abilitystubquerymissionvaild_fuzzer.cpp +++ b/test/fuzztest/abilitystubquerymissionvaild_fuzzer/abilitystubquerymissionvaild_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubrecordappexitreason_fuzzer/abilitystubrecordappexitreason_fuzzer.cpp b/test/fuzztest/abilitystubrecordappexitreason_fuzzer/abilitystubrecordappexitreason_fuzzer.cpp index f2411ff9e4..2615a8d810 100644 --- a/test/fuzztest/abilitystubrecordappexitreason_fuzzer/abilitystubrecordappexitreason_fuzzer.cpp +++ b/test/fuzztest/abilitystubrecordappexitreason_fuzzer/abilitystubrecordappexitreason_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubregistercancellistener_fuzzer/abilitystubregistercancellistener_fuzzer.cpp b/test/fuzztest/abilitystubregistercancellistener_fuzzer/abilitystubregistercancellistener_fuzzer.cpp index 92b32a4717..b94f9b6792 100644 --- a/test/fuzztest/abilitystubregistercancellistener_fuzzer/abilitystubregistercancellistener_fuzzer.cpp +++ b/test/fuzztest/abilitystubregistercancellistener_fuzzer/abilitystubregistercancellistener_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubregistercollaborator_fuzzer/abilitystubregistercollaborator_fuzzer.cpp b/test/fuzztest/abilitystubregistercollaborator_fuzzer/abilitystubregistercollaborator_fuzzer.cpp index 88a5bdb950..c8d162f0d7 100644 --- a/test/fuzztest/abilitystubregistercollaborator_fuzzer/abilitystubregistercollaborator_fuzzer.cpp +++ b/test/fuzztest/abilitystubregistercollaborator_fuzzer/abilitystubregistercollaborator_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubregisterconnectionobserver_fuzzer/abilitystubregisterconnectionobserver_fuzzer.cpp b/test/fuzztest/abilitystubregisterconnectionobserver_fuzzer/abilitystubregisterconnectionobserver_fuzzer.cpp index 80f32a48a9..884fc77cef 100644 --- a/test/fuzztest/abilitystubregisterconnectionobserver_fuzzer/abilitystubregisterconnectionobserver_fuzzer.cpp +++ b/test/fuzztest/abilitystubregisterconnectionobserver_fuzzer/abilitystubregisterconnectionobserver_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubregistermissionlistener_fuzzer/abilitystubregistermissionlistener_fuzzer.cpp b/test/fuzztest/abilitystubregistermissionlistener_fuzzer/abilitystubregistermissionlistener_fuzzer.cpp index aef2a793e4..d22b009ee8 100644 --- a/test/fuzztest/abilitystubregistermissionlistener_fuzzer/abilitystubregistermissionlistener_fuzzer.cpp +++ b/test/fuzztest/abilitystubregistermissionlistener_fuzzer/abilitystubregistermissionlistener_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubregisterremotemissionlistener_fuzzer/abilitystubregisterremotemissionlistener_fuzzer.cpp b/test/fuzztest/abilitystubregisterremotemissionlistener_fuzzer/abilitystubregisterremotemissionlistener_fuzzer.cpp index 00b19fadb2..a7b34cfa21 100644 --- a/test/fuzztest/abilitystubregisterremotemissionlistener_fuzzer/abilitystubregisterremotemissionlistener_fuzzer.cpp +++ b/test/fuzztest/abilitystubregisterremotemissionlistener_fuzzer/abilitystubregisterremotemissionlistener_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubregisterremoteofflistener_fuzzer/abilitystubregisterremoteofflistener_fuzzer.cpp b/test/fuzztest/abilitystubregisterremoteofflistener_fuzzer/abilitystubregisterremoteofflistener_fuzzer.cpp index 5d4173d43d..2f52a4c2f5 100644 --- a/test/fuzztest/abilitystubregisterremoteofflistener_fuzzer/abilitystubregisterremoteofflistener_fuzzer.cpp +++ b/test/fuzztest/abilitystubregisterremoteofflistener_fuzzer/abilitystubregisterremoteofflistener_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubregisterremoteonlistener_fuzzer/abilitystubregisterremoteonlistener_fuzzer.cpp b/test/fuzztest/abilitystubregisterremoteonlistener_fuzzer/abilitystubregisterremoteonlistener_fuzzer.cpp index 48b2a0339f..8bfbcc3c85 100644 --- a/test/fuzztest/abilitystubregisterremoteonlistener_fuzzer/abilitystubregisterremoteonlistener_fuzzer.cpp +++ b/test/fuzztest/abilitystubregisterremoteonlistener_fuzzer/abilitystubregisterremoteonlistener_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubregisterwmshandler_fuzzer/abilitystubregisterwmshandler_fuzzer.cpp b/test/fuzztest/abilitystubregisterwmshandler_fuzzer/abilitystubregisterwmshandler_fuzzer.cpp index 6b9e24f7c6..5cb38cd764 100644 --- a/test/fuzztest/abilitystubregisterwmshandler_fuzzer/abilitystubregisterwmshandler_fuzzer.cpp +++ b/test/fuzztest/abilitystubregisterwmshandler_fuzzer/abilitystubregisterwmshandler_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubreleasecallability_fuzzer/abilitystubreleasecallability_fuzzer.cpp b/test/fuzztest/abilitystubreleasecallability_fuzzer/abilitystubreleasecallability_fuzzer.cpp index ea99e37281..bdb84f7140 100644 --- a/test/fuzztest/abilitystubreleasecallability_fuzzer/abilitystubreleasecallability_fuzzer.cpp +++ b/test/fuzztest/abilitystubreleasecallability_fuzzer/abilitystubreleasecallability_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubreleasedataability_fuzzer/abilitystubreleasedataability_fuzzer.cpp b/test/fuzztest/abilitystubreleasedataability_fuzzer/abilitystubreleasedataability_fuzzer.cpp index 5db26f09d7..906c5c161d 100644 --- a/test/fuzztest/abilitystubreleasedataability_fuzzer/abilitystubreleasedataability_fuzzer.cpp +++ b/test/fuzztest/abilitystubreleasedataability_fuzzer/abilitystubreleasedataability_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubreportdrawncompleted_fuzzer/abilitystubreportdrawncompleted_fuzzer.cpp b/test/fuzztest/abilitystubreportdrawncompleted_fuzzer/abilitystubreportdrawncompleted_fuzzer.cpp index 0fc3cc1570..94d0547672 100644 --- a/test/fuzztest/abilitystubreportdrawncompleted_fuzzer/abilitystubreportdrawncompleted_fuzzer.cpp +++ b/test/fuzztest/abilitystubreportdrawncompleted_fuzzer/abilitystubreportdrawncompleted_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubrequestdialogservice_fuzzer/abilitystubrequestdialogservice_fuzzer.cpp b/test/fuzztest/abilitystubrequestdialogservice_fuzzer/abilitystubrequestdialogservice_fuzzer.cpp index 1ad1d7f8be..572aaf1dbc 100644 --- a/test/fuzztest/abilitystubrequestdialogservice_fuzzer/abilitystubrequestdialogservice_fuzzer.cpp +++ b/test/fuzztest/abilitystubrequestdialogservice_fuzzer/abilitystubrequestdialogservice_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubsendanrprocessid_fuzzer/abilitystubsendanrprocessid_fuzzer.cpp b/test/fuzztest/abilitystubsendanrprocessid_fuzzer/abilitystubsendanrprocessid_fuzzer.cpp index 4a60dcd78f..7b7f0f1ec2 100644 --- a/test/fuzztest/abilitystubsendanrprocessid_fuzzer/abilitystubsendanrprocessid_fuzzer.cpp +++ b/test/fuzztest/abilitystubsendanrprocessid_fuzzer/abilitystubsendanrprocessid_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubsendresulttoability_fuzzer/abilitystubsendresulttoability_fuzzer.cpp b/test/fuzztest/abilitystubsendresulttoability_fuzzer/abilitystubsendresulttoability_fuzzer.cpp index 95b2a7323c..fd7f4375a5 100644 --- a/test/fuzztest/abilitystubsendresulttoability_fuzzer/abilitystubsendresulttoability_fuzzer.cpp +++ b/test/fuzztest/abilitystubsendresulttoability_fuzzer/abilitystubsendresulttoability_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubsendwantsender_fuzzer/abilitystubsendwantsender_fuzzer.cpp b/test/fuzztest/abilitystubsendwantsender_fuzzer/abilitystubsendwantsender_fuzzer.cpp index 2f8251dc04..c7426aef63 100644 --- a/test/fuzztest/abilitystubsendwantsender_fuzzer/abilitystubsendwantsender_fuzzer.cpp +++ b/test/fuzztest/abilitystubsendwantsender_fuzzer/abilitystubsendwantsender_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubsetabilitycontroller_fuzzer/abilitystubsetabilitycontroller_fuzzer.cpp b/test/fuzztest/abilitystubsetabilitycontroller_fuzzer/abilitystubsetabilitycontroller_fuzzer.cpp index 3dabb8c053..62e1f03828 100644 --- a/test/fuzztest/abilitystubsetabilitycontroller_fuzzer/abilitystubsetabilitycontroller_fuzzer.cpp +++ b/test/fuzztest/abilitystubsetabilitycontroller_fuzzer/abilitystubsetabilitycontroller_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubsetmissioncontinuestate_fuzzer/abilitystubsetmissioncontinuestate_fuzzer.cpp b/test/fuzztest/abilitystubsetmissioncontinuestate_fuzzer/abilitystubsetmissioncontinuestate_fuzzer.cpp index 26f6ff572c..7cfb480235 100644 --- a/test/fuzztest/abilitystubsetmissioncontinuestate_fuzzer/abilitystubsetmissioncontinuestate_fuzzer.cpp +++ b/test/fuzztest/abilitystubsetmissioncontinuestate_fuzzer/abilitystubsetmissioncontinuestate_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubsetmissionicon_fuzzer/abilitystubsetmissionicon_fuzzer.cpp b/test/fuzztest/abilitystubsetmissionicon_fuzzer/abilitystubsetmissionicon_fuzzer.cpp index 7e531baceb..c089c8b3c7 100644 --- a/test/fuzztest/abilitystubsetmissionicon_fuzzer/abilitystubsetmissionicon_fuzzer.cpp +++ b/test/fuzztest/abilitystubsetmissionicon_fuzzer/abilitystubsetmissionicon_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubsetmissionlabel_fuzzer/abilitystubsetmissionlabel_fuzzer.cpp b/test/fuzztest/abilitystubsetmissionlabel_fuzzer/abilitystubsetmissionlabel_fuzzer.cpp index f85bdaed1c..e12c4d9a39 100644 --- a/test/fuzztest/abilitystubsetmissionlabel_fuzzer/abilitystubsetmissionlabel_fuzzer.cpp +++ b/test/fuzztest/abilitystubsetmissionlabel_fuzzer/abilitystubsetmissionlabel_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubsetrootscenesession_fuzzer/abilitystubsetrootscenesession_fuzzer.cpp b/test/fuzztest/abilitystubsetrootscenesession_fuzzer/abilitystubsetrootscenesession_fuzzer.cpp index 469abe7efb..33c90c5af3 100644 --- a/test/fuzztest/abilitystubsetrootscenesession_fuzzer/abilitystubsetrootscenesession_fuzzer.cpp +++ b/test/fuzztest/abilitystubsetrootscenesession_fuzzer/abilitystubsetrootscenesession_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubsetsessionmanagerservice_fuzzer/abilitystubsetsessionmanagerservice_fuzzer.cpp b/test/fuzztest/abilitystubsetsessionmanagerservice_fuzzer/abilitystubsetsessionmanagerservice_fuzzer.cpp index 8f477ed7f6..30941e2db4 100644 --- a/test/fuzztest/abilitystubsetsessionmanagerservice_fuzzer/abilitystubsetsessionmanagerservice_fuzzer.cpp +++ b/test/fuzztest/abilitystubsetsessionmanagerservice_fuzzer/abilitystubsetsessionmanagerservice_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubsharedatadone_fuzzer/abilitystubsharedatadone_fuzzer.cpp b/test/fuzztest/abilitystubsharedatadone_fuzzer/abilitystubsharedatadone_fuzzer.cpp index 050f93b4c1..e6d045c824 100644 --- a/test/fuzztest/abilitystubsharedatadone_fuzzer/abilitystubsharedatadone_fuzzer.cpp +++ b/test/fuzztest/abilitystubsharedatadone_fuzzer/abilitystubsharedatadone_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubstartability_fuzzer/abilitystubstartability_fuzzer.cpp b/test/fuzztest/abilitystubstartability_fuzzer/abilitystubstartability_fuzzer.cpp index d3a8205253..69f0827fcc 100644 --- a/test/fuzztest/abilitystubstartability_fuzzer/abilitystubstartability_fuzzer.cpp +++ b/test/fuzztest/abilitystubstartability_fuzzer/abilitystubstartability_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubstartabilityaddcaller_fuzzer/abilitystubstartabilityaddcaller_fuzzer.cpp b/test/fuzztest/abilitystubstartabilityaddcaller_fuzzer/abilitystubstartabilityaddcaller_fuzzer.cpp index fe020d8b5d..675021a353 100644 --- a/test/fuzztest/abilitystubstartabilityaddcaller_fuzzer/abilitystubstartabilityaddcaller_fuzzer.cpp +++ b/test/fuzztest/abilitystubstartabilityaddcaller_fuzzer/abilitystubstartabilityaddcaller_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubstartabilityascallerbytoken_fuzzer/abilitystubstartabilityascallerbytoken_fuzzer.cpp b/test/fuzztest/abilitystubstartabilityascallerbytoken_fuzzer/abilitystubstartabilityascallerbytoken_fuzzer.cpp index 66b4510fe7..271a57f2b1 100644 --- a/test/fuzztest/abilitystubstartabilityascallerbytoken_fuzzer/abilitystubstartabilityascallerbytoken_fuzzer.cpp +++ b/test/fuzztest/abilitystubstartabilityascallerbytoken_fuzzer/abilitystubstartabilityascallerbytoken_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubstartabilityascallerforoptions_fuzzer/abilitystubstartabilityascallerforoptions_fuzzer.cpp b/test/fuzztest/abilitystubstartabilityascallerforoptions_fuzzer/abilitystubstartabilityascallerforoptions_fuzzer.cpp index a04cb64092..4234f58bc8 100644 --- a/test/fuzztest/abilitystubstartabilityascallerforoptions_fuzzer/abilitystubstartabilityascallerforoptions_fuzzer.cpp +++ b/test/fuzztest/abilitystubstartabilityascallerforoptions_fuzzer/abilitystubstartabilityascallerforoptions_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubstartabilitybycall_fuzzer/abilitystubstartabilitybycall_fuzzer.cpp b/test/fuzztest/abilitystubstartabilitybycall_fuzzer/abilitystubstartabilitybycall_fuzzer.cpp index fe90e48ca2..483611025e 100644 --- a/test/fuzztest/abilitystubstartabilitybycall_fuzzer/abilitystubstartabilitybycall_fuzzer.cpp +++ b/test/fuzztest/abilitystubstartabilitybycall_fuzzer/abilitystubstartabilitybycall_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubstartabilityforoptions_fuzzer/abilitystubstartabilityforoptions_fuzzer.cpp b/test/fuzztest/abilitystubstartabilityforoptions_fuzzer/abilitystubstartabilityforoptions_fuzzer.cpp index e7a8d92ec2..6227e079c0 100644 --- a/test/fuzztest/abilitystubstartabilityforoptions_fuzzer/abilitystubstartabilityforoptions_fuzzer.cpp +++ b/test/fuzztest/abilitystubstartabilityforoptions_fuzzer/abilitystubstartabilityforoptions_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubstartabilityforsettings_fuzzer/abilitystubstartabilityforsettings_fuzzer.cpp b/test/fuzztest/abilitystubstartabilityforsettings_fuzzer/abilitystubstartabilityforsettings_fuzzer.cpp index e8eee772e5..03cc27ea43 100644 --- a/test/fuzztest/abilitystubstartabilityforsettings_fuzzer/abilitystubstartabilityforsettings_fuzzer.cpp +++ b/test/fuzztest/abilitystubstartabilityforsettings_fuzzer/abilitystubstartabilityforsettings_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubstartcontinuation_fuzzer/abilitystubstartcontinuation_fuzzer.cpp b/test/fuzztest/abilitystubstartcontinuation_fuzzer/abilitystubstartcontinuation_fuzzer.cpp index c7be959814..0d0dc0b354 100644 --- a/test/fuzztest/abilitystubstartcontinuation_fuzzer/abilitystubstartcontinuation_fuzzer.cpp +++ b/test/fuzztest/abilitystubstartcontinuation_fuzzer/abilitystubstartcontinuation_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubstartextensionability_fuzzer/abilitystubstartextensionability_fuzzer.cpp b/test/fuzztest/abilitystubstartextensionability_fuzzer/abilitystubstartextensionability_fuzzer.cpp index cc8fab04fc..35808b9fb7 100644 --- a/test/fuzztest/abilitystubstartextensionability_fuzzer/abilitystubstartextensionability_fuzzer.cpp +++ b/test/fuzztest/abilitystubstartextensionability_fuzzer/abilitystubstartextensionability_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubstartspecifiedabilitybyscb_fuzzer/abilitystubstartspecifiedabilitybyscb_fuzzer.cpp b/test/fuzztest/abilitystubstartspecifiedabilitybyscb_fuzzer/abilitystubstartspecifiedabilitybyscb_fuzzer.cpp index b502aac251..94e1a79527 100644 --- a/test/fuzztest/abilitystubstartspecifiedabilitybyscb_fuzzer/abilitystubstartspecifiedabilitybyscb_fuzzer.cpp +++ b/test/fuzztest/abilitystubstartspecifiedabilitybyscb_fuzzer/abilitystubstartspecifiedabilitybyscb_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubstartsyncmissions_fuzzer/abilitystubstartsyncmissions_fuzzer.cpp b/test/fuzztest/abilitystubstartsyncmissions_fuzzer/abilitystubstartsyncmissions_fuzzer.cpp index dba5d14cdb..e92d0d1b46 100644 --- a/test/fuzztest/abilitystubstartsyncmissions_fuzzer/abilitystubstartsyncmissions_fuzzer.cpp +++ b/test/fuzztest/abilitystubstartsyncmissions_fuzzer/abilitystubstartsyncmissions_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubstartuiabilitybyscb_fuzzer/abilitystubstartuiabilitybyscb_fuzzer.cpp b/test/fuzztest/abilitystubstartuiabilitybyscb_fuzzer/abilitystubstartuiabilitybyscb_fuzzer.cpp index 5d9a814a8f..8d99cbcecd 100644 --- a/test/fuzztest/abilitystubstartuiabilitybyscb_fuzzer/abilitystubstartuiabilitybyscb_fuzzer.cpp +++ b/test/fuzztest/abilitystubstartuiabilitybyscb_fuzzer/abilitystubstartuiabilitybyscb_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubstartuiextensionability_fuzzer/abilitystubstartuiextensionability_fuzzer.cpp b/test/fuzztest/abilitystubstartuiextensionability_fuzzer/abilitystubstartuiextensionability_fuzzer.cpp index 2699865283..e999d0c7d4 100644 --- a/test/fuzztest/abilitystubstartuiextensionability_fuzzer/abilitystubstartuiextensionability_fuzzer.cpp +++ b/test/fuzztest/abilitystubstartuiextensionability_fuzzer/abilitystubstartuiextensionability_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubstartuser_fuzzer/abilitystubstartuser_fuzzer.cpp b/test/fuzztest/abilitystubstartuser_fuzzer/abilitystubstartuser_fuzzer.cpp index c3a9a94052..cdb186a991 100644 --- a/test/fuzztest/abilitystubstartuser_fuzzer/abilitystubstartuser_fuzzer.cpp +++ b/test/fuzztest/abilitystubstartuser_fuzzer/abilitystubstartuser_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubstartusertest_fuzzer/abilitystubstartusertest_fuzzer.cpp b/test/fuzztest/abilitystubstartusertest_fuzzer/abilitystubstartusertest_fuzzer.cpp index cc31b54a81..0e6a5db90c 100644 --- a/test/fuzztest/abilitystubstartusertest_fuzzer/abilitystubstartusertest_fuzzer.cpp +++ b/test/fuzztest/abilitystubstartusertest_fuzzer/abilitystubstartusertest_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubstopextensionability_fuzzer/abilitystubstopextensionability_fuzzer.cpp b/test/fuzztest/abilitystubstopextensionability_fuzzer/abilitystubstopextensionability_fuzzer.cpp index a85f7e75b6..ad32c37871 100644 --- a/test/fuzztest/abilitystubstopextensionability_fuzzer/abilitystubstopextensionability_fuzzer.cpp +++ b/test/fuzztest/abilitystubstopextensionability_fuzzer/abilitystubstopextensionability_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubstopserviceability_fuzzer/abilitystubstopserviceability_fuzzer.cpp b/test/fuzztest/abilitystubstopserviceability_fuzzer/abilitystubstopserviceability_fuzzer.cpp index c70eb0aa6e..438ad91cb0 100644 --- a/test/fuzztest/abilitystubstopserviceability_fuzzer/abilitystubstopserviceability_fuzzer.cpp +++ b/test/fuzztest/abilitystubstopserviceability_fuzzer/abilitystubstopserviceability_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubstopsyncmissions_fuzzer/abilitystubstopsyncmissions_fuzzer.cpp b/test/fuzztest/abilitystubstopsyncmissions_fuzzer/abilitystubstopsyncmissions_fuzzer.cpp index e9c430180c..9b76ef439c 100644 --- a/test/fuzztest/abilitystubstopsyncmissions_fuzzer/abilitystubstopsyncmissions_fuzzer.cpp +++ b/test/fuzztest/abilitystubstopsyncmissions_fuzzer/abilitystubstopsyncmissions_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubstopuser_fuzzer/abilitystubstopuser_fuzzer.cpp b/test/fuzztest/abilitystubstopuser_fuzzer/abilitystubstopuser_fuzzer.cpp index 5edb45dd8f..bd8c37146c 100644 --- a/test/fuzztest/abilitystubstopuser_fuzzer/abilitystubstopuser_fuzzer.cpp +++ b/test/fuzztest/abilitystubstopuser_fuzzer/abilitystubstopuser_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubterminateability_fuzzer/abilitystubterminateability_fuzzer.cpp b/test/fuzztest/abilitystubterminateability_fuzzer/abilitystubterminateability_fuzzer.cpp index 89e94163ef..5d41fd6ce6 100644 --- a/test/fuzztest/abilitystubterminateability_fuzzer/abilitystubterminateability_fuzzer.cpp +++ b/test/fuzztest/abilitystubterminateability_fuzzer/abilitystubterminateability_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubterminateuiextensionability_fuzzer/abilitystubterminateuiextensionability_fuzzer.cpp b/test/fuzztest/abilitystubterminateuiextensionability_fuzzer/abilitystubterminateuiextensionability_fuzzer.cpp index e5960096af..4fcf230d82 100644 --- a/test/fuzztest/abilitystubterminateuiextensionability_fuzzer/abilitystubterminateuiextensionability_fuzzer.cpp +++ b/test/fuzztest/abilitystubterminateuiextensionability_fuzzer/abilitystubterminateuiextensionability_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubuninstallapp_fuzzer/abilitystubuninstallapp_fuzzer.cpp b/test/fuzztest/abilitystubuninstallapp_fuzzer/abilitystubuninstallapp_fuzzer.cpp index 60923efdcb..7dab55e20e 100644 --- a/test/fuzztest/abilitystubuninstallapp_fuzzer/abilitystubuninstallapp_fuzzer.cpp +++ b/test/fuzztest/abilitystubuninstallapp_fuzzer/abilitystubuninstallapp_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -64,7 +63,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; } diff --git a/test/fuzztest/abilitystubunlockmissionforcleanup_fuzzer/abilitystubunlockmissionforcleanup_fuzzer.cpp b/test/fuzztest/abilitystubunlockmissionforcleanup_fuzzer/abilitystubunlockmissionforcleanup_fuzzer.cpp index 7bf61d2be9..e5b17bf770 100644 --- a/test/fuzztest/abilitystubunlockmissionforcleanup_fuzzer/abilitystubunlockmissionforcleanup_fuzzer.cpp +++ b/test/fuzztest/abilitystubunlockmissionforcleanup_fuzzer/abilitystubunlockmissionforcleanup_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubunregistercancellistener_fuzzer/abilitystubunregistercancellistener_fuzzer.cpp b/test/fuzztest/abilitystubunregistercancellistener_fuzzer/abilitystubunregistercancellistener_fuzzer.cpp index 7c5feb425a..1fc03be4e7 100644 --- a/test/fuzztest/abilitystubunregistercancellistener_fuzzer/abilitystubunregistercancellistener_fuzzer.cpp +++ b/test/fuzztest/abilitystubunregistercancellistener_fuzzer/abilitystubunregistercancellistener_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubunregistercollaborator_fuzzer/abilitystubunregistercollaborator_fuzzer.cpp b/test/fuzztest/abilitystubunregistercollaborator_fuzzer/abilitystubunregistercollaborator_fuzzer.cpp index 8f7fe985e7..7365b3723b 100644 --- a/test/fuzztest/abilitystubunregistercollaborator_fuzzer/abilitystubunregistercollaborator_fuzzer.cpp +++ b/test/fuzztest/abilitystubunregistercollaborator_fuzzer/abilitystubunregistercollaborator_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubunregisterconnectionobserver_fuzzer/abilitystubunregisterconnectionobserver_fuzzer.cpp b/test/fuzztest/abilitystubunregisterconnectionobserver_fuzzer/abilitystubunregisterconnectionobserver_fuzzer.cpp index 134525879f..653ce2864e 100644 --- a/test/fuzztest/abilitystubunregisterconnectionobserver_fuzzer/abilitystubunregisterconnectionobserver_fuzzer.cpp +++ b/test/fuzztest/abilitystubunregisterconnectionobserver_fuzzer/abilitystubunregisterconnectionobserver_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubunregistermissionlistener_fuzzer/abilitystubunregistermissionlistener_fuzzer.cpp b/test/fuzztest/abilitystubunregistermissionlistener_fuzzer/abilitystubunregistermissionlistener_fuzzer.cpp index 3c4b7ae6df..03396a64c6 100644 --- a/test/fuzztest/abilitystubunregistermissionlistener_fuzzer/abilitystubunregistermissionlistener_fuzzer.cpp +++ b/test/fuzztest/abilitystubunregistermissionlistener_fuzzer/abilitystubunregistermissionlistener_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubunregisterremotemissionlistener_fuzzer/abilitystubunregisterremotemissionlistener_fuzzer.cpp b/test/fuzztest/abilitystubunregisterremotemissionlistener_fuzzer/abilitystubunregisterremotemissionlistener_fuzzer.cpp index f5e0edaa38..7150eb35fb 100644 --- a/test/fuzztest/abilitystubunregisterremotemissionlistener_fuzzer/abilitystubunregisterremotemissionlistener_fuzzer.cpp +++ b/test/fuzztest/abilitystubunregisterremotemissionlistener_fuzzer/abilitystubunregisterremotemissionlistener_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubupdatemissionsnapshotfromwms_fuzzer/abilitystubupdatemissionsnapshotfromwms_fuzzer.cpp b/test/fuzztest/abilitystubupdatemissionsnapshotfromwms_fuzzer/abilitystubupdatemissionsnapshotfromwms_fuzzer.cpp index d7ee92c0cf..bad9cae2bd 100644 --- a/test/fuzztest/abilitystubupdatemissionsnapshotfromwms_fuzzer/abilitystubupdatemissionsnapshotfromwms_fuzzer.cpp +++ b/test/fuzztest/abilitystubupdatemissionsnapshotfromwms_fuzzer/abilitystubupdatemissionsnapshotfromwms_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitystubverifypermission_fuzzer/abilitystubverifypermission_fuzzer.cpp b/test/fuzztest/abilitystubverifypermission_fuzzer/abilitystubverifypermission_fuzzer.cpp index 8acbd36b8f..10175c5130 100644 --- a/test/fuzztest/abilitystubverifypermission_fuzzer/abilitystubverifypermission_fuzzer.cpp +++ b/test/fuzztest/abilitystubverifypermission_fuzzer/abilitystubverifypermission_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.AbilityManager"; @@ -63,7 +62,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; } diff --git a/test/fuzztest/abilitytransitiondone_fuzzer/abilitytransitiondone_fuzzer.cpp b/test/fuzztest/abilitytransitiondone_fuzzer/abilitytransitiondone_fuzzer.cpp index 0c6fda737b..519361c50a 100644 --- a/test/fuzztest/abilitytransitiondone_fuzzer/abilitytransitiondone_fuzzer.cpp +++ b/test/fuzztest/abilitytransitiondone_fuzzer/abilitytransitiondone_fuzzer.cpp @@ -32,7 +32,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr int32_t UID_TEST = 100; constexpr int OFFSET_ZERO = 24; @@ -120,7 +119,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; } diff --git a/test/fuzztest/acquiredataability_fuzzer/acquiredataability_fuzzer.cpp b/test/fuzztest/acquiredataability_fuzzer/acquiredataability_fuzzer.cpp index e952e7af80..387a50a218 100644 --- a/test/fuzztest/acquiredataability_fuzzer/acquiredataability_fuzzer.cpp +++ b/test/fuzztest/acquiredataability_fuzzer/acquiredataability_fuzzer.cpp @@ -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; } sptr GetFuzzAbilityToken() @@ -92,7 +91,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; } diff --git a/test/fuzztest/addabilitystagedone_fuzzer/addabilitystagedone_fuzzer.cpp b/test/fuzztest/addabilitystagedone_fuzzer/addabilitystagedone_fuzzer.cpp index 09eab37d0a..d5d13cb4f2 100755 --- a/test/fuzztest/addabilitystagedone_fuzzer/addabilitystagedone_fuzzer.cpp +++ b/test/fuzztest/addabilitystagedone_fuzzer/addabilitystagedone_fuzzer.cpp @@ -32,7 +32,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -68,7 +67,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; } diff --git a/test/fuzztest/amsmanager_fuzzer/amsmanager_fuzzer.cpp b/test/fuzztest/amsmanager_fuzzer/amsmanager_fuzzer.cpp index 41cec505ef..271b80a8c6 100644 --- a/test/fuzztest/amsmanager_fuzzer/amsmanager_fuzzer.cpp +++ b/test/fuzztest/amsmanager_fuzzer/amsmanager_fuzzer.cpp @@ -33,7 +33,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -76,7 +75,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; } diff --git a/test/fuzztest/amsmgrscheduler_fuzzer/amsmgrscheduler_fuzzer.cpp b/test/fuzztest/amsmgrscheduler_fuzzer/amsmgrscheduler_fuzzer.cpp index eff2ff6f4d..e6ac16c8b4 100755 --- a/test/fuzztest/amsmgrscheduler_fuzzer/amsmgrscheduler_fuzzer.cpp +++ b/test/fuzztest/amsmgrscheduler_fuzzer/amsmgrscheduler_fuzzer.cpp @@ -34,7 +34,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -143,7 +142,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; } diff --git a/test/fuzztest/appforegroundstateobserverproxy_fuzzer/appforegroundstateobserverproxy_fuzzer.cpp b/test/fuzztest/appforegroundstateobserverproxy_fuzzer/appforegroundstateobserverproxy_fuzzer.cpp index 3d6a11aed1..ad068bd867 100644 --- a/test/fuzztest/appforegroundstateobserverproxy_fuzzer/appforegroundstateobserverproxy_fuzzer.cpp +++ b/test/fuzztest/appforegroundstateobserverproxy_fuzzer/appforegroundstateobserverproxy_fuzzer.cpp @@ -35,7 +35,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -77,7 +76,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; } diff --git a/test/fuzztest/applicationanrlistener_fuzzer/applicationanrlistener_fuzzer.cpp b/test/fuzztest/applicationanrlistener_fuzzer/applicationanrlistener_fuzzer.cpp index 76df529fbe..1917dcd5a5 100755 --- a/test/fuzztest/applicationanrlistener_fuzzer/applicationanrlistener_fuzzer.cpp +++ b/test/fuzztest/applicationanrlistener_fuzzer/applicationanrlistener_fuzzer.cpp @@ -42,7 +42,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -199,7 +198,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; } diff --git a/test/fuzztest/applifecycledeal_fuzzer/applifecycledeal_fuzzer.cpp b/test/fuzztest/applifecycledeal_fuzzer/applifecycledeal_fuzzer.cpp index 5e71cae7a6..099b18c899 100644 --- a/test/fuzztest/applifecycledeal_fuzzer/applifecycledeal_fuzzer.cpp +++ b/test/fuzztest/applifecycledeal_fuzzer/applifecycledeal_fuzzer.cpp @@ -32,7 +32,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -105,7 +104,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; } diff --git a/test/fuzztest/appmanager_fuzzer/appmanager_fuzzer.cpp b/test/fuzztest/appmanager_fuzzer/appmanager_fuzzer.cpp index 275f16ee67..0d6d5d841b 100644 --- a/test/fuzztest/appmanager_fuzzer/appmanager_fuzzer.cpp +++ b/test/fuzztest/appmanager_fuzzer/appmanager_fuzzer.cpp @@ -31,7 +31,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -74,7 +73,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; } diff --git a/test/fuzztest/appmgrclientrest_fuzzer/appmgrclientrest_fuzzer.cpp b/test/fuzztest/appmgrclientrest_fuzzer/appmgrclientrest_fuzzer.cpp index 3987eb3c38..a1b7204525 100755 --- a/test/fuzztest/appmgrclientrest_fuzzer/appmgrclientrest_fuzzer.cpp +++ b/test/fuzztest/appmgrclientrest_fuzzer/appmgrclientrest_fuzzer.cpp @@ -33,7 +33,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -73,7 +72,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; } diff --git a/test/fuzztest/appmgrrest_fuzzer/appmgrrest_fuzzer.cpp b/test/fuzztest/appmgrrest_fuzzer/appmgrrest_fuzzer.cpp index 01b1667730..47566bc038 100755 --- a/test/fuzztest/appmgrrest_fuzzer/appmgrrest_fuzzer.cpp +++ b/test/fuzztest/appmgrrest_fuzzer/appmgrrest_fuzzer.cpp @@ -37,7 +37,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -112,7 +111,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; } diff --git a/test/fuzztest/appmgrservicefirst_fuzzer/appmgrservicefirst_fuzzer.cpp b/test/fuzztest/appmgrservicefirst_fuzzer/appmgrservicefirst_fuzzer.cpp index 3937e70c53..82d9377d15 100644 --- a/test/fuzztest/appmgrservicefirst_fuzzer/appmgrservicefirst_fuzzer.cpp +++ b/test/fuzztest/appmgrservicefirst_fuzzer/appmgrservicefirst_fuzzer.cpp @@ -35,7 +35,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -154,7 +153,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; } diff --git a/test/fuzztest/appmgrstub_fuzzer/appmgrstub_fuzzer.cpp b/test/fuzztest/appmgrstub_fuzzer/appmgrstub_fuzzer.cpp index 4c2d7d4dee..43cbd9b147 100644 --- a/test/fuzztest/appmgrstub_fuzzer/appmgrstub_fuzzer.cpp +++ b/test/fuzztest/appmgrstub_fuzzer/appmgrstub_fuzzer.cpp @@ -36,7 +36,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -83,7 +82,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; } diff --git a/test/fuzztest/apprunningstatusproxy_fuzzer/apprunningstatusproxy_fuzzer.cpp b/test/fuzztest/apprunningstatusproxy_fuzzer/apprunningstatusproxy_fuzzer.cpp index 9634fa15df..d1392e82b6 100644 --- a/test/fuzztest/apprunningstatusproxy_fuzzer/apprunningstatusproxy_fuzzer.cpp +++ b/test/fuzztest/apprunningstatusproxy_fuzzer/apprunningstatusproxy_fuzzer.cpp @@ -33,7 +33,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -74,7 +73,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; } diff --git a/test/fuzztest/appstateobservermanager_fuzzer/appstateobservermanager_fuzzer.cpp b/test/fuzztest/appstateobservermanager_fuzzer/appstateobservermanager_fuzzer.cpp index cbf7212c5a..0a668e52e9 100644 --- a/test/fuzztest/appstateobservermanager_fuzzer/appstateobservermanager_fuzzer.cpp +++ b/test/fuzztest/appstateobservermanager_fuzzer/appstateobservermanager_fuzzer.cpp @@ -30,7 +30,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -83,7 +82,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; } diff --git a/test/fuzztest/assertfaultcallbackdeathmgr_fuzzer/assertfaultcallbackdeathmgr_fuzzer.cpp b/test/fuzztest/assertfaultcallbackdeathmgr_fuzzer/assertfaultcallbackdeathmgr_fuzzer.cpp index d6269c766e..939f46ac7f 100644 --- a/test/fuzztest/assertfaultcallbackdeathmgr_fuzzer/assertfaultcallbackdeathmgr_fuzzer.cpp +++ b/test/fuzztest/assertfaultcallbackdeathmgr_fuzzer/assertfaultcallbackdeathmgr_fuzzer.cpp @@ -30,7 +30,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -73,7 +72,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; } diff --git a/test/fuzztest/assertfaultproxy_fuzzer/assertfaultproxy_fuzzer.cpp b/test/fuzztest/assertfaultproxy_fuzzer/assertfaultproxy_fuzzer.cpp index 6d077cf889..434c37b1cd 100644 --- a/test/fuzztest/assertfaultproxy_fuzzer/assertfaultproxy_fuzzer.cpp +++ b/test/fuzztest/assertfaultproxy_fuzzer/assertfaultproxy_fuzzer.cpp @@ -31,7 +31,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -91,7 +90,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; } diff --git a/test/fuzztest/attachabilitythread_fuzzer/attachabilitythread_fuzzer.cpp b/test/fuzztest/attachabilitythread_fuzzer/attachabilitythread_fuzzer.cpp index 21b9710d3b..ead6adc03d 100755 --- a/test/fuzztest/attachabilitythread_fuzzer/attachabilitythread_fuzzer.cpp +++ b/test/fuzztest/attachabilitythread_fuzzer/attachabilitythread_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr int32_t UID_TEST = 100; constexpr int OFFSET_ZERO = 24; @@ -242,7 +241,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; } diff --git a/test/fuzztest/attachrenderprocess_fuzzer/attachrenderprocess_fuzzer.cpp b/test/fuzztest/attachrenderprocess_fuzzer/attachrenderprocess_fuzzer.cpp index 61d068191a..3fddf88971 100755 --- a/test/fuzztest/attachrenderprocess_fuzzer/attachrenderprocess_fuzzer.cpp +++ b/test/fuzztest/attachrenderprocess_fuzzer/attachrenderprocess_fuzzer.cpp @@ -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; } diff --git a/test/fuzztest/autostartupinfo_fuzzer/autostartupinfo_fuzzer.cpp b/test/fuzztest/autostartupinfo_fuzzer/autostartupinfo_fuzzer.cpp index a41bb3e202..f771ddf77e 100644 --- a/test/fuzztest/autostartupinfo_fuzzer/autostartupinfo_fuzzer.cpp +++ b/test/fuzztest/autostartupinfo_fuzzer/autostartupinfo_fuzzer.cpp @@ -32,7 +32,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -66,7 +65,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; } diff --git a/test/fuzztest/bundlemgrhelper_fuzzer/bundlemgrhelper_fuzzer.cpp b/test/fuzztest/bundlemgrhelper_fuzzer/bundlemgrhelper_fuzzer.cpp index 708862901b..a746c303fd 100755 --- a/test/fuzztest/bundlemgrhelper_fuzzer/bundlemgrhelper_fuzzer.cpp +++ b/test/fuzztest/bundlemgrhelper_fuzzer/bundlemgrhelper_fuzzer.cpp @@ -35,7 +35,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -166,7 +165,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; } diff --git a/test/fuzztest/cacheprocessmanagera_fuzzer/cacheprocessmanagera_fuzzer.cpp b/test/fuzztest/cacheprocessmanagera_fuzzer/cacheprocessmanagera_fuzzer.cpp index 8bd1adb4c3..afbefc435b 100755 --- a/test/fuzztest/cacheprocessmanagera_fuzzer/cacheprocessmanagera_fuzzer.cpp +++ b/test/fuzztest/cacheprocessmanagera_fuzzer/cacheprocessmanagera_fuzzer.cpp @@ -36,7 +36,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -204,7 +203,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; } diff --git a/test/fuzztest/cacheprocessmanagerb_fuzzer/cacheprocessmanagerb_fuzzer.cpp b/test/fuzztest/cacheprocessmanagerb_fuzzer/cacheprocessmanagerb_fuzzer.cpp index f968ac6ab9..08a0264ca0 100755 --- a/test/fuzztest/cacheprocessmanagerb_fuzzer/cacheprocessmanagerb_fuzzer.cpp +++ b/test/fuzztest/cacheprocessmanagerb_fuzzer/cacheprocessmanagerb_fuzzer.cpp @@ -36,7 +36,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -149,7 +148,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; } diff --git a/test/fuzztest/cancelwantsender_fuzzer/cancelwantsender_fuzzer.cpp b/test/fuzztest/cancelwantsender_fuzzer/cancelwantsender_fuzzer.cpp index 41f0b9c23c..0e72de5f0f 100755 --- a/test/fuzztest/cancelwantsender_fuzzer/cancelwantsender_fuzzer.cpp +++ b/test/fuzztest/cancelwantsender_fuzzer/cancelwantsender_fuzzer.cpp @@ -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; } diff --git a/test/fuzztest/cleanallmissions_fuzzer/cleanallmissions_fuzzer.cpp b/test/fuzztest/cleanallmissions_fuzzer/cleanallmissions_fuzzer.cpp index 4b48d77202..326780368c 100755 --- a/test/fuzztest/cleanallmissions_fuzzer/cleanallmissions_fuzzer.cpp +++ b/test/fuzztest/cleanallmissions_fuzzer/cleanallmissions_fuzzer.cpp @@ -26,7 +26,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) @@ -54,7 +53,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; } diff --git a/test/fuzztest/cleanmission_fuzzer/cleanmission_fuzzer.cpp b/test/fuzztest/cleanmission_fuzzer/cleanmission_fuzzer.cpp index 31ed743a8d..d94c3350bd 100755 --- a/test/fuzztest/cleanmission_fuzzer/cleanmission_fuzzer.cpp +++ b/test/fuzztest/cleanmission_fuzzer/cleanmission_fuzzer.cpp @@ -26,7 +26,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } uint32_t GetU32Data(const char* ptr) @@ -60,7 +59,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; } diff --git a/test/fuzztest/clearupapplicationdata_fuzzer/clearupapplicationdata_fuzzer.cpp b/test/fuzztest/clearupapplicationdata_fuzzer/clearupapplicationdata_fuzzer.cpp index 200bd3a8d5..fbe90c24c0 100755 --- a/test/fuzztest/clearupapplicationdata_fuzzer/clearupapplicationdata_fuzzer.cpp +++ b/test/fuzztest/clearupapplicationdata_fuzzer/clearupapplicationdata_fuzzer.cpp @@ -30,7 +30,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -69,7 +68,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; } diff --git a/test/fuzztest/closeability_fuzzer/closeability_fuzzer.cpp b/test/fuzztest/closeability_fuzzer/closeability_fuzzer.cpp index 007f48b5ab..e8ce431bb2 100755 --- a/test/fuzztest/closeability_fuzzer/closeability_fuzzer.cpp +++ b/test/fuzztest/closeability_fuzzer/closeability_fuzzer.cpp @@ -26,7 +26,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } sptr GetFuzzAbilityToken() @@ -89,7 +88,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; } diff --git a/test/fuzztest/completefirstframedrawing_fuzzer/completefirstframedrawing_fuzzer.cpp b/test/fuzztest/completefirstframedrawing_fuzzer/completefirstframedrawing_fuzzer.cpp index d25bce3933..33f13121da 100755 --- a/test/fuzztest/completefirstframedrawing_fuzzer/completefirstframedrawing_fuzzer.cpp +++ b/test/fuzztest/completefirstframedrawing_fuzzer/completefirstframedrawing_fuzzer.cpp @@ -26,7 +26,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } sptr GetFuzzAbilityToken() @@ -74,7 +73,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; } diff --git a/test/fuzztest/connectability_fuzzer/connectability_fuzzer.cpp b/test/fuzztest/connectability_fuzzer/connectability_fuzzer.cpp index c69fef813c..c955a4e25f 100755 --- a/test/fuzztest/connectability_fuzzer/connectability_fuzzer.cpp +++ b/test/fuzztest/connectability_fuzzer/connectability_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } class AbilityConnectCallbackFuzz : public AbilityRuntime::AbilityConnectCallback { @@ -83,7 +82,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; } diff --git a/test/fuzztest/connectionobserverclient_fuzzer/connectionobserverclient_fuzzer.cpp b/test/fuzztest/connectionobserverclient_fuzzer/connectionobserverclient_fuzzer.cpp index 02438a4181..72fcb9dc14 100755 --- a/test/fuzztest/connectionobserverclient_fuzzer/connectionobserverclient_fuzzer.cpp +++ b/test/fuzztest/connectionobserverclient_fuzzer/connectionobserverclient_fuzzer.cpp @@ -34,7 +34,6 @@ using namespace OHOS::AbilityRuntime; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; class MyConnectionObserver : public ConnectionObserver { @@ -104,7 +103,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; } diff --git a/test/fuzztest/connectionobserverclientimpl_fuzzer/connectionobserverclientimpl_fuzzer.cpp b/test/fuzztest/connectionobserverclientimpl_fuzzer/connectionobserverclientimpl_fuzzer.cpp index cb1c200d65..fac5cd3742 100755 --- a/test/fuzztest/connectionobserverclientimpl_fuzzer/connectionobserverclientimpl_fuzzer.cpp +++ b/test/fuzztest/connectionobserverclientimpl_fuzzer/connectionobserverclientimpl_fuzzer.cpp @@ -35,7 +35,6 @@ using namespace OHOS::AbilityRuntime; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; class MyConnectionObserver : public ConnectionObserver { @@ -98,7 +97,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; } diff --git a/test/fuzztest/connectionstatemanager_fuzzer/connectionstatemanager_fuzzer.cpp b/test/fuzztest/connectionstatemanager_fuzzer/connectionstatemanager_fuzzer.cpp index 043e9c1408..70f56cd365 100755 --- a/test/fuzztest/connectionstatemanager_fuzzer/connectionstatemanager_fuzzer.cpp +++ b/test/fuzztest/connectionstatemanager_fuzzer/connectionstatemanager_fuzzer.cpp @@ -36,7 +36,6 @@ using namespace OHOS::AbilityRuntime; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; class MyAbilityConnection : public IAbilityConnection { @@ -243,7 +242,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; } diff --git a/test/fuzztest/continueability_fuzzer/continueability_fuzzer.cpp b/test/fuzztest/continueability_fuzzer/continueability_fuzzer.cpp index 147b01e13e..2bd517dced 100755 --- a/test/fuzztest/continueability_fuzzer/continueability_fuzzer.cpp +++ b/test/fuzztest/continueability_fuzzer/continueability_fuzzer.cpp @@ -26,7 +26,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } uint32_t GetU32Data(const char* ptr) @@ -62,7 +61,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; } diff --git a/test/fuzztest/continuemission_fuzzer/continuemission_fuzzer.cpp b/test/fuzztest/continuemission_fuzzer/continuemission_fuzzer.cpp index 617f1b5c2d..98ef6f4cff 100755 --- a/test/fuzztest/continuemission_fuzzer/continuemission_fuzzer.cpp +++ b/test/fuzztest/continuemission_fuzzer/continuemission_fuzzer.cpp @@ -26,7 +26,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } uint32_t GetU32Data(const char* ptr) @@ -73,7 +72,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; } diff --git a/test/fuzztest/crowdtestinterceptor_fuzzer/crowdtestinterceptor_fuzzer.cpp b/test/fuzztest/crowdtestinterceptor_fuzzer/crowdtestinterceptor_fuzzer.cpp index 1cc8c5cf61..bf48870bcc 100644 --- a/test/fuzztest/crowdtestinterceptor_fuzzer/crowdtestinterceptor_fuzzer.cpp +++ b/test/fuzztest/crowdtestinterceptor_fuzzer/crowdtestinterceptor_fuzzer.cpp @@ -32,7 +32,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -88,7 +87,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; } diff --git a/test/fuzztest/dataabilitymanager_fuzzer/dataabilitymanager_fuzzer.cpp b/test/fuzztest/dataabilitymanager_fuzzer/dataabilitymanager_fuzzer.cpp index 14bd9c2b64..54f95189be 100755 --- a/test/fuzztest/dataabilitymanager_fuzzer/dataabilitymanager_fuzzer.cpp +++ b/test/fuzztest/dataabilitymanager_fuzzer/dataabilitymanager_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; } @@ -117,7 +116,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; } diff --git a/test/fuzztest/deeplinkreserveconfig_fuzzer/deeplinkreserveconfig_fuzzer.cpp b/test/fuzztest/deeplinkreserveconfig_fuzzer/deeplinkreserveconfig_fuzzer.cpp index 87b037e944..7b47d734cb 100644 --- a/test/fuzztest/deeplinkreserveconfig_fuzzer/deeplinkreserveconfig_fuzzer.cpp +++ b/test/fuzztest/deeplinkreserveconfig_fuzzer/deeplinkreserveconfig_fuzzer.cpp @@ -33,7 +33,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -141,7 +140,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; } diff --git a/test/fuzztest/delegatordoabilityforeground_fuzzer/delegatordoabilityforeground_fuzzer.cpp b/test/fuzztest/delegatordoabilityforeground_fuzzer/delegatordoabilityforeground_fuzzer.cpp index 4582419564..5f19975baf 100755 --- a/test/fuzztest/delegatordoabilityforeground_fuzzer/delegatordoabilityforeground_fuzzer.cpp +++ b/test/fuzztest/delegatordoabilityforeground_fuzzer/delegatordoabilityforeground_fuzzer.cpp @@ -26,7 +26,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } sptr GetFuzzAbilityToken() @@ -81,7 +80,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; } diff --git a/test/fuzztest/dialogsessioninfo_fuzzer/dialogsessioninfo_fuzzer.cpp b/test/fuzztest/dialogsessioninfo_fuzzer/dialogsessioninfo_fuzzer.cpp index 7ab19b6855..6e2d00de6b 100644 --- a/test/fuzztest/dialogsessioninfo_fuzzer/dialogsessioninfo_fuzzer.cpp +++ b/test/fuzztest/dialogsessioninfo_fuzzer/dialogsessioninfo_fuzzer.cpp @@ -31,7 +31,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -72,7 +71,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; } diff --git a/test/fuzztest/dialogsessionmanager_fuzzer/dialogsessionmanager_fuzzer.cpp b/test/fuzztest/dialogsessionmanager_fuzzer/dialogsessionmanager_fuzzer.cpp index 3773de491d..6528c733d0 100644 --- a/test/fuzztest/dialogsessionmanager_fuzzer/dialogsessionmanager_fuzzer.cpp +++ b/test/fuzztest/dialogsessionmanager_fuzzer/dialogsessionmanager_fuzzer.cpp @@ -30,7 +30,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -116,7 +115,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; } diff --git a/test/fuzztest/disposedobserver_fuzzer/disposedobserver_fuzzer.cpp b/test/fuzztest/disposedobserver_fuzzer/disposedobserver_fuzzer.cpp index 5d28526286..b33c48cb4b 100644 --- a/test/fuzztest/disposedobserver_fuzzer/disposedobserver_fuzzer.cpp +++ b/test/fuzztest/disposedobserver_fuzzer/disposedobserver_fuzzer.cpp @@ -33,7 +33,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -70,7 +69,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; } diff --git a/test/fuzztest/doabilitybackground_fuzzer/doabilitybackground_fuzzer.cpp b/test/fuzztest/doabilitybackground_fuzzer/doabilitybackground_fuzzer.cpp index 7cbf436339..1d203ed370 100644 --- a/test/fuzztest/doabilitybackground_fuzzer/doabilitybackground_fuzzer.cpp +++ b/test/fuzztest/doabilitybackground_fuzzer/doabilitybackground_fuzzer.cpp @@ -26,7 +26,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } uint32_t GetU32Data(const char* ptr) @@ -81,7 +80,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; } diff --git a/test/fuzztest/doabilityforeground_fuzzer/doabilityforeground_fuzzer.cpp b/test/fuzztest/doabilityforeground_fuzzer/doabilityforeground_fuzzer.cpp index d625cf64a0..21d5e4b129 100644 --- a/test/fuzztest/doabilityforeground_fuzzer/doabilityforeground_fuzzer.cpp +++ b/test/fuzztest/doabilityforeground_fuzzer/doabilityforeground_fuzzer.cpp @@ -26,7 +26,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } uint32_t GetU32Data(const char* ptr) @@ -82,7 +81,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; } diff --git a/test/fuzztest/dumpabilityinfodone_fuzzer/dumpabilityinfodone_fuzzer.cpp b/test/fuzztest/dumpabilityinfodone_fuzzer/dumpabilityinfodone_fuzzer.cpp index 1c42ea1e92..7b49d08d88 100644 --- a/test/fuzztest/dumpabilityinfodone_fuzzer/dumpabilityinfodone_fuzzer.cpp +++ b/test/fuzztest/dumpabilityinfodone_fuzzer/dumpabilityinfodone_fuzzer.cpp @@ -26,7 +26,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } sptr GetFuzzAbilityToken() @@ -78,7 +77,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; } diff --git a/test/fuzztest/dumpstate_fuzzer/dumpstate_fuzzer.cpp b/test/fuzztest/dumpstate_fuzzer/dumpstate_fuzzer.cpp index 72995a2e0c..ddc661398e 100644 --- a/test/fuzztest/dumpstate_fuzzer/dumpstate_fuzzer.cpp +++ b/test/fuzztest/dumpstate_fuzzer/dumpstate_fuzzer.cpp @@ -26,7 +26,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) @@ -58,7 +57,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; } diff --git a/test/fuzztest/dumpsysstate_fuzzer/dumpsysstate_fuzzer.cpp b/test/fuzztest/dumpsysstate_fuzzer/dumpsysstate_fuzzer.cpp index 84f52c182b..b468715a65 100644 --- a/test/fuzztest/dumpsysstate_fuzzer/dumpsysstate_fuzzer.cpp +++ b/test/fuzztest/dumpsysstate_fuzzer/dumpsysstate_fuzzer.cpp @@ -26,7 +26,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) @@ -61,7 +60,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; } diff --git a/test/fuzztest/extensionconfig_fuzzer/extensionconfig_fuzzer.cpp b/test/fuzztest/extensionconfig_fuzzer/extensionconfig_fuzzer.cpp index 0bc1d83a35..2040afe528 100644 --- a/test/fuzztest/extensionconfig_fuzzer/extensionconfig_fuzzer.cpp +++ b/test/fuzztest/extensionconfig_fuzzer/extensionconfig_fuzzer.cpp @@ -32,7 +32,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -77,7 +76,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; } diff --git a/test/fuzztest/extensioncontrolinterceptor_fuzzer/extension_control_interceptor_fuzzer.cpp b/test/fuzztest/extensioncontrolinterceptor_fuzzer/extension_control_interceptor_fuzzer.cpp index 0dda0547bd..6e89741112 100644 --- a/test/fuzztest/extensioncontrolinterceptor_fuzzer/extension_control_interceptor_fuzzer.cpp +++ b/test/fuzztest/extensioncontrolinterceptor_fuzzer/extension_control_interceptor_fuzzer.cpp @@ -31,7 +31,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -87,7 +86,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; } diff --git a/test/fuzztest/extensionpermissionsutil_fuzzer/extension_permissions_util_fuzzer.cpp b/test/fuzztest/extensionpermissionsutil_fuzzer/extension_permissions_util_fuzzer.cpp index a80ad668c5..febd5b0910 100755 --- a/test/fuzztest/extensionpermissionsutil_fuzzer/extension_permissions_util_fuzzer.cpp +++ b/test/fuzztest/extensionpermissionsutil_fuzzer/extension_permissions_util_fuzzer.cpp @@ -34,7 +34,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -70,7 +69,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; } diff --git a/test/fuzztest/extensionrecordfactory_fuzzer/extensionrecordfactory_fuzzer.cpp b/test/fuzztest/extensionrecordfactory_fuzzer/extensionrecordfactory_fuzzer.cpp index dcbb38e147..0050ec2f85 100644 --- a/test/fuzztest/extensionrecordfactory_fuzzer/extensionrecordfactory_fuzzer.cpp +++ b/test/fuzztest/extensionrecordfactory_fuzzer/extensionrecordfactory_fuzzer.cpp @@ -33,7 +33,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -80,7 +79,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; } diff --git a/test/fuzztest/extensionrecordmanager_fuzzer/extensionrecordmanager_fuzzer.cpp b/test/fuzztest/extensionrecordmanager_fuzzer/extensionrecordmanager_fuzzer.cpp index 6b941953a9..90f513f4a1 100644 --- a/test/fuzztest/extensionrecordmanager_fuzzer/extensionrecordmanager_fuzzer.cpp +++ b/test/fuzztest/extensionrecordmanager_fuzzer/extensionrecordmanager_fuzzer.cpp @@ -33,7 +33,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -123,7 +122,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; } diff --git a/test/fuzztest/extensionrecordmanagera_fuzzer/extensionrecordmanagera_fuzzer.cpp b/test/fuzztest/extensionrecordmanagera_fuzzer/extensionrecordmanagera_fuzzer.cpp index 6888a455ea..439e192770 100755 --- a/test/fuzztest/extensionrecordmanagera_fuzzer/extensionrecordmanagera_fuzzer.cpp +++ b/test/fuzztest/extensionrecordmanagera_fuzzer/extensionrecordmanagera_fuzzer.cpp @@ -37,7 +37,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -192,7 +191,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; } diff --git a/test/fuzztest/faultdata_fuzzer/faultdata_fuzzer.cpp b/test/fuzztest/faultdata_fuzzer/faultdata_fuzzer.cpp index 7dd60609d1..2bca96b929 100755 --- a/test/fuzztest/faultdata_fuzzer/faultdata_fuzzer.cpp +++ b/test/fuzztest/faultdata_fuzzer/faultdata_fuzzer.cpp @@ -35,7 +35,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -158,7 +157,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; } diff --git a/test/fuzztest/forcetimeoutfortest_fuzzer/forcetimeoutfortest_fuzzer.cpp b/test/fuzztest/forcetimeoutfortest_fuzzer/forcetimeoutfortest_fuzzer.cpp index 597c4da1b1..95d003e8b9 100644 --- a/test/fuzztest/forcetimeoutfortest_fuzzer/forcetimeoutfortest_fuzzer.cpp +++ b/test/fuzztest/forcetimeoutfortest_fuzzer/forcetimeoutfortest_fuzzer.cpp @@ -26,7 +26,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } // namespace 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; } diff --git a/test/fuzztest/freeinstallabilityfromremote_fuzzer/freeinstallabilityfromremote_fuzzer.cpp b/test/fuzztest/freeinstallabilityfromremote_fuzzer/freeinstallabilityfromremote_fuzzer.cpp index 44184bc743..c6136ecbbe 100644 --- a/test/fuzztest/freeinstallabilityfromremote_fuzzer/freeinstallabilityfromremote_fuzzer.cpp +++ b/test/fuzztest/freeinstallabilityfromremote_fuzzer/freeinstallabilityfromremote_fuzzer.cpp @@ -26,7 +26,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } sptr GetFuzzAbilityToken() @@ -94,7 +93,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; } diff --git a/test/fuzztest/freezeutil_fuzzer/freezeutil_fuzzer.cpp b/test/fuzztest/freezeutil_fuzzer/freezeutil_fuzzer.cpp index f3e3cbfa88..a8e1ca1a5e 100644 --- a/test/fuzztest/freezeutil_fuzzer/freezeutil_fuzzer.cpp +++ b/test/fuzztest/freezeutil_fuzzer/freezeutil_fuzzer.cpp @@ -30,7 +30,6 @@ using namespace OHOS::AbilityRuntime; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } @@ -77,7 +76,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; } diff --git a/test/fuzztest/getabilityrunninginfos_fuzzer/getabilityrunninginfos_fuzzer.cpp b/test/fuzztest/getabilityrunninginfos_fuzzer/getabilityrunninginfos_fuzzer.cpp index e38d89bc0d..0bbe5dcf89 100755 --- a/test/fuzztest/getabilityrunninginfos_fuzzer/getabilityrunninginfos_fuzzer.cpp +++ b/test/fuzztest/getabilityrunninginfos_fuzzer/getabilityrunninginfos_fuzzer.cpp @@ -27,7 +27,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) @@ -55,7 +54,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; } diff --git a/test/fuzztest/getapplicationinfobyprocessid_fuzzer/getapplicationinfobyprocessid_fuzzer.cpp b/test/fuzztest/getapplicationinfobyprocessid_fuzzer/getapplicationinfobyprocessid_fuzzer.cpp index 6bb8005d7f..95bc7fc2e3 100755 --- a/test/fuzztest/getapplicationinfobyprocessid_fuzzer/getapplicationinfobyprocessid_fuzzer.cpp +++ b/test/fuzztest/getapplicationinfobyprocessid_fuzzer/getapplicationinfobyprocessid_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } uint32_t GetU32Data(const char* ptr) @@ -66,7 +65,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; } diff --git a/test/fuzztest/getappmemorysize_fuzzer/getappmemorysize_fuzzer.cpp b/test/fuzztest/getappmemorysize_fuzzer/getappmemorysize_fuzzer.cpp index 7df8cc774f..0e6a01ace2 100755 --- a/test/fuzztest/getappmemorysize_fuzzer/getappmemorysize_fuzzer.cpp +++ b/test/fuzztest/getappmemorysize_fuzzer/getappmemorysize_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } // namespace @@ -68,7 +67,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; } diff --git a/test/fuzztest/getconfiguration_fuzzer/getconfiguration_fuzzer.cpp b/test/fuzztest/getconfiguration_fuzzer/getconfiguration_fuzzer.cpp index 898935488d..46ef1096b1 100755 --- a/test/fuzztest/getconfiguration_fuzzer/getconfiguration_fuzzer.cpp +++ b/test/fuzztest/getconfiguration_fuzzer/getconfiguration_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } @@ -63,7 +62,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; } diff --git a/test/fuzztest/getmissionidbytoken_fuzzer/getmissionidbytoken_fuzzer.cpp b/test/fuzztest/getmissionidbytoken_fuzzer/getmissionidbytoken_fuzzer.cpp index b67f4da27a..33d12a08a7 100755 --- a/test/fuzztest/getmissionidbytoken_fuzzer/getmissionidbytoken_fuzzer.cpp +++ b/test/fuzztest/getmissionidbytoken_fuzzer/getmissionidbytoken_fuzzer.cpp @@ -27,7 +27,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } sptr GetFuzzAbilityToken() @@ -82,7 +81,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; } diff --git a/test/fuzztest/getmissioninfos_fuzzer/getmissioninfos_fuzzer.cpp b/test/fuzztest/getmissioninfos_fuzzer/getmissioninfos_fuzzer.cpp index 28c38cabe0..75e6974f89 100755 --- a/test/fuzztest/getmissioninfos_fuzzer/getmissioninfos_fuzzer.cpp +++ b/test/fuzztest/getmissioninfos_fuzzer/getmissioninfos_fuzzer.cpp @@ -26,7 +26,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } uint32_t GetU32Data(const char* ptr) @@ -62,7 +61,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; } diff --git a/test/fuzztest/getprocessrunninginfos_fuzzer/getprocessrunninginfos_fuzzer.cpp b/test/fuzztest/getprocessrunninginfos_fuzzer/getprocessrunninginfos_fuzzer.cpp index add1a418e0..f150f08e7f 100755 --- a/test/fuzztest/getprocessrunninginfos_fuzzer/getprocessrunninginfos_fuzzer.cpp +++ b/test/fuzztest/getprocessrunninginfos_fuzzer/getprocessrunninginfos_fuzzer.cpp @@ -27,7 +27,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) @@ -55,7 +54,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; } diff --git a/test/fuzztest/getprocessrunninginfosbyuserid_fuzzer/getprocessrunninginfosbyuserid_fuzzer.cpp b/test/fuzztest/getprocessrunninginfosbyuserid_fuzzer/getprocessrunninginfosbyuserid_fuzzer.cpp index 77f3a8b333..7c7366743e 100755 --- a/test/fuzztest/getprocessrunninginfosbyuserid_fuzzer/getprocessrunninginfosbyuserid_fuzzer.cpp +++ b/test/fuzztest/getprocessrunninginfosbyuserid_fuzzer/getprocessrunninginfosbyuserid_fuzzer.cpp @@ -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; } uint32_t GetU32Data(const char* ptr) @@ -64,7 +63,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; } diff --git a/test/fuzztest/getrunningprocessinfobytoken_fuzzer/getrunningprocessinfobytoken_fuzzer.cpp b/test/fuzztest/getrunningprocessinfobytoken_fuzzer/getrunningprocessinfobytoken_fuzzer.cpp index 0a04af5147..dab1c2f1af 100755 --- a/test/fuzztest/getrunningprocessinfobytoken_fuzzer/getrunningprocessinfobytoken_fuzzer.cpp +++ b/test/fuzztest/getrunningprocessinfobytoken_fuzzer/getrunningprocessinfobytoken_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } @@ -77,7 +76,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; } diff --git a/test/fuzztest/getwantsender_fuzzer/getwantsender_fuzzer.cpp b/test/fuzztest/getwantsender_fuzzer/getwantsender_fuzzer.cpp index 5ccd53cd92..9dba85a27b 100755 --- a/test/fuzztest/getwantsender_fuzzer/getwantsender_fuzzer.cpp +++ b/test/fuzztest/getwantsender_fuzzer/getwantsender_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } sptr GetFuzzAbilityToken() @@ -101,7 +100,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; } diff --git a/test/fuzztest/handledlpapp_fuzzer/handledlpapp_fuzzer.cpp b/test/fuzztest/handledlpapp_fuzzer/handledlpapp_fuzzer.cpp index 8986fd642f..5e218a262f 100755 --- a/test/fuzztest/handledlpapp_fuzzer/handledlpapp_fuzzer.cpp +++ b/test/fuzztest/handledlpapp_fuzzer/handledlpapp_fuzzer.cpp @@ -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) @@ -66,7 +65,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; } diff --git a/test/fuzztest/insightintentexecutecallbackstub_fuzzer/insightintentexecutecallbackstub_fuzzer.cpp b/test/fuzztest/insightintentexecutecallbackstub_fuzzer/insightintentexecutecallbackstub_fuzzer.cpp index 7c16545b33..4ee9ae47dd 100644 --- a/test/fuzztest/insightintentexecutecallbackstub_fuzzer/insightintentexecutecallbackstub_fuzzer.cpp +++ b/test/fuzztest/insightintentexecutecallbackstub_fuzzer/insightintentexecutecallbackstub_fuzzer.cpp @@ -33,7 +33,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -87,7 +86,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; } diff --git a/test/fuzztest/isramconstraineddevice_fuzzer/isramconstraineddevice_fuzzer.cpp b/test/fuzztest/isramconstraineddevice_fuzzer/isramconstraineddevice_fuzzer.cpp index 29b0b61218..3fa56c470a 100755 --- a/test/fuzztest/isramconstraineddevice_fuzzer/isramconstraineddevice_fuzzer.cpp +++ b/test/fuzztest/isramconstraineddevice_fuzzer/isramconstraineddevice_fuzzer.cpp @@ -29,7 +29,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) @@ -67,7 +66,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; } diff --git a/test/fuzztest/jsabilityautostartupmanager_fuzzer/jsabilityautostartupmanager_fuzzer.cpp b/test/fuzztest/jsabilityautostartupmanager_fuzzer/jsabilityautostartupmanager_fuzzer.cpp index a5d70456cc..b4c9e96b09 100755 --- a/test/fuzztest/jsabilityautostartupmanager_fuzzer/jsabilityautostartupmanager_fuzzer.cpp +++ b/test/fuzztest/jsabilityautostartupmanager_fuzzer/jsabilityautostartupmanager_fuzzer.cpp @@ -35,7 +35,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -96,7 +95,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; } diff --git a/test/fuzztest/killapplication_fuzzer/killapplication_fuzzer.cpp b/test/fuzztest/killapplication_fuzzer/killapplication_fuzzer.cpp index db06e65666..4d1e1196b4 100755 --- a/test/fuzztest/killapplication_fuzzer/killapplication_fuzzer.cpp +++ b/test/fuzztest/killapplication_fuzzer/killapplication_fuzzer.cpp @@ -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) @@ -59,7 +58,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; } diff --git a/test/fuzztest/killapplicationself_fuzzer/killapplicationself_fuzzer.cpp b/test/fuzztest/killapplicationself_fuzzer/killapplicationself_fuzzer.cpp index 96d823b273..1f734d7529 100755 --- a/test/fuzztest/killapplicationself_fuzzer/killapplicationself_fuzzer.cpp +++ b/test/fuzztest/killapplicationself_fuzzer/killapplicationself_fuzzer.cpp @@ -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) @@ -55,7 +54,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; } diff --git a/test/fuzztest/killprocessbyabilitytoken_fuzzer/killprocessbyabilitytoken_fuzzer.cpp b/test/fuzztest/killprocessbyabilitytoken_fuzzer/killprocessbyabilitytoken_fuzzer.cpp index ecbf0ed0fa..028c8e7bfd 100755 --- a/test/fuzztest/killprocessbyabilitytoken_fuzzer/killprocessbyabilitytoken_fuzzer.cpp +++ b/test/fuzztest/killprocessbyabilitytoken_fuzzer/killprocessbyabilitytoken_fuzzer.cpp @@ -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; } sptr GetFuzzAbilityToken() @@ -76,7 +75,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; } diff --git a/test/fuzztest/killprocessesbybundlename_fuzzer/killprocessesbybundlename_fuzzer.cpp b/test/fuzztest/killprocessesbybundlename_fuzzer/killprocessesbybundlename_fuzzer.cpp index 8d086e8e58..6ab79aab96 100755 --- a/test/fuzztest/killprocessesbybundlename_fuzzer/killprocessesbybundlename_fuzzer.cpp +++ b/test/fuzztest/killprocessesbybundlename_fuzzer/killprocessesbybundlename_fuzzer.cpp @@ -26,7 +26,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) @@ -55,7 +54,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; } diff --git a/test/fuzztest/killprocessesbyuserid_fuzzer/killprocessesbyuserid_fuzzer.cpp b/test/fuzztest/killprocessesbyuserid_fuzzer/killprocessesbyuserid_fuzzer.cpp index f1a8722775..6d4fcea7fb 100755 --- a/test/fuzztest/killprocessesbyuserid_fuzzer/killprocessesbyuserid_fuzzer.cpp +++ b/test/fuzztest/killprocessesbyuserid_fuzzer/killprocessesbyuserid_fuzzer.cpp @@ -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; } uint32_t GetU32Data(const char* ptr) @@ -63,7 +62,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; } diff --git a/test/fuzztest/loadability_fuzzer/loadability_fuzzer.cpp b/test/fuzztest/loadability_fuzzer/loadability_fuzzer.cpp index 72c98b4162..0421298b08 100755 --- a/test/fuzztest/loadability_fuzzer/loadability_fuzzer.cpp +++ b/test/fuzztest/loadability_fuzzer/loadability_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } namespace { @@ -114,7 +113,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; } diff --git a/test/fuzztest/lockmissionforcleanup_fuzzer/lockmissionforcleanup_fuzzer.cpp b/test/fuzztest/lockmissionforcleanup_fuzzer/lockmissionforcleanup_fuzzer.cpp index 056b50424a..30557728b3 100644 --- a/test/fuzztest/lockmissionforcleanup_fuzzer/lockmissionforcleanup_fuzzer.cpp +++ b/test/fuzztest/lockmissionforcleanup_fuzzer/lockmissionforcleanup_fuzzer.cpp @@ -26,7 +26,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } uint32_t GetU32Data(const char* ptr) @@ -59,7 +58,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; } diff --git a/test/fuzztest/minimizeability_fuzzer/minimizeability_fuzzer.cpp b/test/fuzztest/minimizeability_fuzzer/minimizeability_fuzzer.cpp index 2203f7c7d8..d1886af3c4 100644 --- a/test/fuzztest/minimizeability_fuzzer/minimizeability_fuzzer.cpp +++ b/test/fuzztest/minimizeability_fuzzer/minimizeability_fuzzer.cpp @@ -26,7 +26,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } // namespace sptr GetFuzzAbilityToken() @@ -75,7 +74,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) return 0; } /* Validate the length of size */ - if (size > OHOS::FOO_MAX_LEN || size < OHOS::U32_AT_SIZE) { + if (size < OHOS::U32_AT_SIZE) { return 0; } char *ch = (char *)malloc(size + 1); diff --git a/test/fuzztest/missiondatastorage_fuzzer/missiondatastorage_fuzzer.cpp b/test/fuzztest/missiondatastorage_fuzzer/missiondatastorage_fuzzer.cpp index 2eb988db9c..a1619c446f 100644 --- a/test/fuzztest/missiondatastorage_fuzzer/missiondatastorage_fuzzer.cpp +++ b/test/fuzztest/missiondatastorage_fuzzer/missiondatastorage_fuzzer.cpp @@ -34,7 +34,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -100,7 +99,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; } diff --git a/test/fuzztest/missioninfomgra_fuzzer/missioninfomgra_fuzzer.cpp b/test/fuzztest/missioninfomgra_fuzzer/missioninfomgra_fuzzer.cpp index 85e19f2422..b969958a79 100644 --- a/test/fuzztest/missioninfomgra_fuzzer/missioninfomgra_fuzzer.cpp +++ b/test/fuzztest/missioninfomgra_fuzzer/missioninfomgra_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } @@ -66,7 +65,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; } diff --git a/test/fuzztest/missioninfomgrb_fuzzer/missioninfomgrb_fuzzer.cpp b/test/fuzztest/missioninfomgrb_fuzzer/missioninfomgrb_fuzzer.cpp index 650b80d1a6..f88bc975e1 100644 --- a/test/fuzztest/missioninfomgrb_fuzzer/missioninfomgrb_fuzzer.cpp +++ b/test/fuzztest/missioninfomgrb_fuzzer/missioninfomgrb_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; } // namespace @@ -67,7 +66,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; } diff --git a/test/fuzztest/missioninfomgrc_fuzzer/missioninfomgrc_fuzzer.cpp b/test/fuzztest/missioninfomgrc_fuzzer/missioninfomgrc_fuzzer.cpp index 1ea4d10b10..d446e8a02a 100644 --- a/test/fuzztest/missioninfomgrc_fuzzer/missioninfomgrc_fuzzer.cpp +++ b/test/fuzztest/missioninfomgrc_fuzzer/missioninfomgrc_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; } // namespace @@ -94,7 +93,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; } diff --git a/test/fuzztest/missionlistenercontroller_fuzzer/missionlistenercontroller_fuzzer.cpp b/test/fuzztest/missionlistenercontroller_fuzzer/missionlistenercontroller_fuzzer.cpp index f3b4424172..f5d1397951 100644 --- a/test/fuzztest/missionlistenercontroller_fuzzer/missionlistenercontroller_fuzzer.cpp +++ b/test/fuzztest/missionlistenercontroller_fuzzer/missionlistenercontroller_fuzzer.cpp @@ -32,7 +32,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr int INPUT_ZERO = 0; @@ -227,7 +226,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; } diff --git a/test/fuzztest/missionlistenerstub_fuzzer/missionlistenerstub_fuzzer.cpp b/test/fuzztest/missionlistenerstub_fuzzer/missionlistenerstub_fuzzer.cpp index 4f137fb5dc..bc6b72b1e3 100644 --- a/test/fuzztest/missionlistenerstub_fuzzer/missionlistenerstub_fuzzer.cpp +++ b/test/fuzztest/missionlistenerstub_fuzzer/missionlistenerstub_fuzzer.cpp @@ -27,7 +27,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.MissionListener"; } @@ -88,7 +87,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; } diff --git a/test/fuzztest/missionlistmanagerfirst_fuzzer/missionlistmanagerfirst_fuzzer.cpp b/test/fuzztest/missionlistmanagerfirst_fuzzer/missionlistmanagerfirst_fuzzer.cpp index 768fce5003..b4bda51657 100644 --- a/test/fuzztest/missionlistmanagerfirst_fuzzer/missionlistmanagerfirst_fuzzer.cpp +++ b/test/fuzztest/missionlistmanagerfirst_fuzzer/missionlistmanagerfirst_fuzzer.cpp @@ -36,7 +36,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t OFFSET_32_VAL = 32; constexpr size_t OFFSET_ZERO = 24; @@ -295,7 +294,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; } diff --git a/test/fuzztest/missionlistmanagerfourth_fuzzer/missionlistmanagerfourth_fuzzer.cpp b/test/fuzztest/missionlistmanagerfourth_fuzzer/missionlistmanagerfourth_fuzzer.cpp index bf28fd2e5c..a574aed3ff 100644 --- a/test/fuzztest/missionlistmanagerfourth_fuzzer/missionlistmanagerfourth_fuzzer.cpp +++ b/test/fuzztest/missionlistmanagerfourth_fuzzer/missionlistmanagerfourth_fuzzer.cpp @@ -30,7 +30,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; class MyAbilityConnection : public IAbilityConnection { @@ -131,7 +130,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) return 0; } /* Validate the length of size */ - if (size < OHOS::U32_AT_SIZE || size > OHOS::FOO_MAX_LEN) { + if (size < OHOS::U32_AT_SIZE) { return 0; } char *ch = (char *)malloc(size + 1); diff --git a/test/fuzztest/missionlistmanagersecond_fuzzer/missionlistmanagersecond_fuzzer.cpp b/test/fuzztest/missionlistmanagersecond_fuzzer/missionlistmanagersecond_fuzzer.cpp index 66d9b42e4f..450e8d2183 100644 --- a/test/fuzztest/missionlistmanagersecond_fuzzer/missionlistmanagersecond_fuzzer.cpp +++ b/test/fuzztest/missionlistmanagersecond_fuzzer/missionlistmanagersecond_fuzzer.cpp @@ -30,7 +30,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; class MyAbilityConnection : public IAbilityConnection { @@ -195,7 +194,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; } diff --git a/test/fuzztest/missionlistmanagerthird_fuzzer/missionlistmanagerthird_fuzzer.cpp b/test/fuzztest/missionlistmanagerthird_fuzzer/missionlistmanagerthird_fuzzer.cpp index a1fcfc15aa..9419e77c2e 100644 --- a/test/fuzztest/missionlistmanagerthird_fuzzer/missionlistmanagerthird_fuzzer.cpp +++ b/test/fuzztest/missionlistmanagerthird_fuzzer/missionlistmanagerthird_fuzzer.cpp @@ -30,7 +30,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; class MyAbilityConnection : public IAbilityConnection { @@ -132,7 +131,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; } diff --git a/test/fuzztest/modulerunningrecord_fuzzer/modulerunningrecord_fuzzer.cpp b/test/fuzztest/modulerunningrecord_fuzzer/modulerunningrecord_fuzzer.cpp index fb89d76f0e..cc961b341c 100644 --- a/test/fuzztest/modulerunningrecord_fuzzer/modulerunningrecord_fuzzer.cpp +++ b/test/fuzztest/modulerunningrecord_fuzzer/modulerunningrecord_fuzzer.cpp @@ -30,7 +30,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -113,7 +112,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; } diff --git a/test/fuzztest/napicommonwant_fuzzer/napicommonwant_fuzzer.cpp b/test/fuzztest/napicommonwant_fuzzer/napicommonwant_fuzzer.cpp index 0d9d03afd0..1fa08988cc 100755 --- a/test/fuzztest/napicommonwant_fuzzer/napicommonwant_fuzzer.cpp +++ b/test/fuzztest/napicommonwant_fuzzer/napicommonwant_fuzzer.cpp @@ -48,7 +48,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -365,7 +364,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; } diff --git a/test/fuzztest/notifycompletecontinuation_fuzzer/notifycompletecontinuation_fuzzer.cpp b/test/fuzztest/notifycompletecontinuation_fuzzer/notifycompletecontinuation_fuzzer.cpp index f2cd4bd46e..28cb826051 100644 --- a/test/fuzztest/notifycompletecontinuation_fuzzer/notifycompletecontinuation_fuzzer.cpp +++ b/test/fuzztest/notifycompletecontinuation_fuzzer/notifycompletecontinuation_fuzzer.cpp @@ -27,7 +27,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { constexpr uint8_t ENABLE = 2; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } uint32_t GetU32Data(const char* ptr) @@ -62,7 +61,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; } diff --git a/test/fuzztest/notifycontinuationresult_fuzzer/notifycontinuationresult_fuzzer.cpp b/test/fuzztest/notifycontinuationresult_fuzzer/notifycontinuationresult_fuzzer.cpp index dc95b7ccaa..a1afa1a953 100644 --- a/test/fuzztest/notifycontinuationresult_fuzzer/notifycontinuationresult_fuzzer.cpp +++ b/test/fuzztest/notifycontinuationresult_fuzzer/notifycontinuationresult_fuzzer.cpp @@ -26,7 +26,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } uint32_t GetU32Data(const char* ptr) @@ -60,7 +59,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; } diff --git a/test/fuzztest/notifymemorylevel_fuzzer/notifymemorylevel_fuzzer.cpp b/test/fuzztest/notifymemorylevel_fuzzer/notifymemorylevel_fuzzer.cpp index d6e6348dba..27504a9f41 100644 --- a/test/fuzztest/notifymemorylevel_fuzzer/notifymemorylevel_fuzzer.cpp +++ b/test/fuzztest/notifymemorylevel_fuzzer/notifymemorylevel_fuzzer.cpp @@ -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; } // namespace bool DoSomethingInterestingWithMyAPI(const char *data, size_t size) @@ -54,7 +53,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; } diff --git a/test/fuzztest/openlinkoptions_fuzzer/openlinkoptions_fuzzer.cpp b/test/fuzztest/openlinkoptions_fuzzer/openlinkoptions_fuzzer.cpp index e30b1560e5..255aa56f38 100644 --- a/test/fuzztest/openlinkoptions_fuzzer/openlinkoptions_fuzzer.cpp +++ b/test/fuzztest/openlinkoptions_fuzzer/openlinkoptions_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; } @@ -72,7 +71,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; } diff --git a/test/fuzztest/pendingwantmanager_fuzzer/pendingwantmanager_fuzzer.cpp b/test/fuzztest/pendingwantmanager_fuzzer/pendingwantmanager_fuzzer.cpp index e8640afa69..5ff87d7966 100644 --- a/test/fuzztest/pendingwantmanager_fuzzer/pendingwantmanager_fuzzer.cpp +++ b/test/fuzztest/pendingwantmanager_fuzzer/pendingwantmanager_fuzzer.cpp @@ -33,7 +33,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; } @@ -176,7 +175,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; } diff --git a/test/fuzztest/prepareterminate_fuzzer/prepareterminate_fuzzer.cpp b/test/fuzztest/prepareterminate_fuzzer/prepareterminate_fuzzer.cpp index 4d2b1346ef..fe24cf229f 100644 --- a/test/fuzztest/prepareterminate_fuzzer/prepareterminate_fuzzer.cpp +++ b/test/fuzztest/prepareterminate_fuzzer/prepareterminate_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } @@ -76,7 +75,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; } diff --git a/test/fuzztest/prestartnwebspawnprocess_fuzzer/prestartnwebspawnprocess_fuzzer.cpp b/test/fuzztest/prestartnwebspawnprocess_fuzzer/prestartnwebspawnprocess_fuzzer.cpp index 5e4a0f12fb..15a6f397d5 100644 --- a/test/fuzztest/prestartnwebspawnprocess_fuzzer/prestartnwebspawnprocess_fuzzer.cpp +++ b/test/fuzztest/prestartnwebspawnprocess_fuzzer/prestartnwebspawnprocess_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } @@ -58,7 +57,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; } diff --git a/test/fuzztest/registerabilitylifecyclecallback_fuzzer/registerabilitylifecyclecallback_fuzzer.cpp b/test/fuzztest/registerabilitylifecyclecallback_fuzzer/registerabilitylifecyclecallback_fuzzer.cpp index c2196d814b..610b8fddae 100644 --- a/test/fuzztest/registerabilitylifecyclecallback_fuzzer/registerabilitylifecyclecallback_fuzzer.cpp +++ b/test/fuzztest/registerabilitylifecyclecallback_fuzzer/registerabilitylifecyclecallback_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AbilityRuntime; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } // namespace class AbilityLifecycleCallbackFuzz : public AbilityLifecycleCallback { @@ -79,7 +78,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) return 0; } /* Validate the length of size */ - if (size > OHOS::FOO_MAX_LEN || size < OHOS::U32_AT_SIZE) { + if (size < OHOS::U32_AT_SIZE) { return 0; } char *ch = (char *)malloc(size + 1); diff --git a/test/fuzztest/registerapplicationstateobserver_fuzzer/registerapplicationstateobserver_fuzzer.cpp b/test/fuzztest/registerapplicationstateobserver_fuzzer/registerapplicationstateobserver_fuzzer.cpp index 8aa547fed9..c71bb42b7a 100644 --- a/test/fuzztest/registerapplicationstateobserver_fuzzer/registerapplicationstateobserver_fuzzer.cpp +++ b/test/fuzztest/registerapplicationstateobserver_fuzzer/registerapplicationstateobserver_fuzzer.cpp @@ -29,7 +29,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) @@ -62,7 +61,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; } diff --git a/test/fuzztest/registerconfigurationobserver_fuzzer/registerconfigurationobserver_fuzzer.cpp b/test/fuzztest/registerconfigurationobserver_fuzzer/registerconfigurationobserver_fuzzer.cpp index a82ad92f49..e4a9367641 100755 --- a/test/fuzztest/registerconfigurationobserver_fuzzer/registerconfigurationobserver_fuzzer.cpp +++ b/test/fuzztest/registerconfigurationobserver_fuzzer/registerconfigurationobserver_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } @@ -60,7 +59,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; } diff --git a/test/fuzztest/registerenvironmentcallback_fuzzer/registerenvironmentcallback_fuzzer.cpp b/test/fuzztest/registerenvironmentcallback_fuzzer/registerenvironmentcallback_fuzzer.cpp index 5bc28c4988..e712c21cb3 100755 --- a/test/fuzztest/registerenvironmentcallback_fuzzer/registerenvironmentcallback_fuzzer.cpp +++ b/test/fuzztest/registerenvironmentcallback_fuzzer/registerenvironmentcallback_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AbilityRuntime; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } class EnvironmentCallbackFuzz : public EnvironmentCallback { @@ -61,7 +60,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; } diff --git a/test/fuzztest/registermissionlistener_fuzzer/registermissionlistener_fuzzer.cpp b/test/fuzztest/registermissionlistener_fuzzer/registermissionlistener_fuzzer.cpp index 5a8058feda..d031222c78 100755 --- a/test/fuzztest/registermissionlistener_fuzzer/registermissionlistener_fuzzer.cpp +++ b/test/fuzztest/registermissionlistener_fuzzer/registermissionlistener_fuzzer.cpp @@ -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; } class MissionListenerFuzz : public IMissionListener { @@ -85,7 +84,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; } diff --git a/test/fuzztest/releasedataability_fuzzer/releasedataability_fuzzer.cpp b/test/fuzztest/releasedataability_fuzzer/releasedataability_fuzzer.cpp index b0737a68b1..8a25c02321 100755 --- a/test/fuzztest/releasedataability_fuzzer/releasedataability_fuzzer.cpp +++ b/test/fuzztest/releasedataability_fuzzer/releasedataability_fuzzer.cpp @@ -26,7 +26,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } sptr GetFuzzAbilityToken() @@ -77,7 +76,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; } diff --git a/test/fuzztest/remotemissionlistenerstub_fuzzer/remotemissionlistenerstub_fuzzer.cpp b/test/fuzztest/remotemissionlistenerstub_fuzzer/remotemissionlistenerstub_fuzzer.cpp index 730e5c84fe..11df4a7687 100755 --- a/test/fuzztest/remotemissionlistenerstub_fuzzer/remotemissionlistenerstub_fuzzer.cpp +++ b/test/fuzztest/remotemissionlistenerstub_fuzzer/remotemissionlistenerstub_fuzzer.cpp @@ -27,7 +27,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.RemoteMissionListener"; } @@ -81,7 +80,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; } diff --git a/test/fuzztest/renderstateobserverproxy_fuzzer/renderstateobserverproxy_fuzzer.cpp b/test/fuzztest/renderstateobserverproxy_fuzzer/renderstateobserverproxy_fuzzer.cpp index 6efd380546..f1c965c08c 100644 --- a/test/fuzztest/renderstateobserverproxy_fuzzer/renderstateobserverproxy_fuzzer.cpp +++ b/test/fuzztest/renderstateobserverproxy_fuzzer/renderstateobserverproxy_fuzzer.cpp @@ -35,7 +35,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -83,7 +82,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; } diff --git a/test/fuzztest/scheduleacceptwantdone_fuzzer/scheduleacceptwantdone_fuzzer.cpp b/test/fuzztest/scheduleacceptwantdone_fuzzer/scheduleacceptwantdone_fuzzer.cpp index b8b40a6290..e8187e43ef 100755 --- a/test/fuzztest/scheduleacceptwantdone_fuzzer/scheduleacceptwantdone_fuzzer.cpp +++ b/test/fuzztest/scheduleacceptwantdone_fuzzer/scheduleacceptwantdone_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } @@ -73,7 +72,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; } diff --git a/test/fuzztest/schedulecommandabilitydone_fuzzer/schedulecommandabilitydone_fuzzer.cpp b/test/fuzztest/schedulecommandabilitydone_fuzzer/schedulecommandabilitydone_fuzzer.cpp index e49b3bed27..aef722a3c0 100755 --- a/test/fuzztest/schedulecommandabilitydone_fuzzer/schedulecommandabilitydone_fuzzer.cpp +++ b/test/fuzztest/schedulecommandabilitydone_fuzzer/schedulecommandabilitydone_fuzzer.cpp @@ -27,7 +27,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr int32_t UID_TEST = 100; constexpr int OFFSET_ZERO = 24; @@ -101,7 +100,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; } diff --git a/test/fuzztest/scheduleconnectabilitydone_fuzzer/scheduleconnectabilitydone_fuzzer.cpp b/test/fuzztest/scheduleconnectabilitydone_fuzzer/scheduleconnectabilitydone_fuzzer.cpp index f68e5d8027..199c978908 100755 --- a/test/fuzztest/scheduleconnectabilitydone_fuzzer/scheduleconnectabilitydone_fuzzer.cpp +++ b/test/fuzztest/scheduleconnectabilitydone_fuzzer/scheduleconnectabilitydone_fuzzer.cpp @@ -27,7 +27,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr int32_t UID_TEST = 100; constexpr int OFFSET_ZERO = 24; @@ -102,7 +101,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; } diff --git a/test/fuzztest/scheduledisconnectabilitydone_fuzzer/scheduledisconnectabilitydone_fuzzer.cpp b/test/fuzztest/scheduledisconnectabilitydone_fuzzer/scheduledisconnectabilitydone_fuzzer.cpp index 7822ebce79..8a18207aba 100755 --- a/test/fuzztest/scheduledisconnectabilitydone_fuzzer/scheduledisconnectabilitydone_fuzzer.cpp +++ b/test/fuzztest/scheduledisconnectabilitydone_fuzzer/scheduledisconnectabilitydone_fuzzer.cpp @@ -27,7 +27,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr int32_t UID_TEST = 100; constexpr int OFFSET_ZERO = 24; @@ -101,7 +100,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; } diff --git a/test/fuzztest/screenunlockinterceptor_fuzzer/screenunlockinterceptor_fuzzer.cpp b/test/fuzztest/screenunlockinterceptor_fuzzer/screenunlockinterceptor_fuzzer.cpp index 27cff61364..af0ef6907e 100644 --- a/test/fuzztest/screenunlockinterceptor_fuzzer/screenunlockinterceptor_fuzzer.cpp +++ b/test/fuzztest/screenunlockinterceptor_fuzzer/screenunlockinterceptor_fuzzer.cpp @@ -33,7 +33,6 @@ constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr uint8_t ENABLE = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -89,7 +88,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; } diff --git a/test/fuzztest/sendresulttoability_fuzzer/sendresulttoability_fuzzer.cpp b/test/fuzztest/sendresulttoability_fuzzer/sendresulttoability_fuzzer.cpp index 36af0f2438..b021da3da8 100755 --- a/test/fuzztest/sendresulttoability_fuzzer/sendresulttoability_fuzzer.cpp +++ b/test/fuzztest/sendresulttoability_fuzzer/sendresulttoability_fuzzer.cpp @@ -26,7 +26,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } @@ -69,7 +68,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; } diff --git a/test/fuzztest/setabilitycontroller_fuzzer/setabilitycontroller_fuzzer.cpp b/test/fuzztest/setabilitycontroller_fuzzer/setabilitycontroller_fuzzer.cpp index 997381a325..ba9d202c96 100755 --- a/test/fuzztest/setabilitycontroller_fuzzer/setabilitycontroller_fuzzer.cpp +++ b/test/fuzztest/setabilitycontroller_fuzzer/setabilitycontroller_fuzzer.cpp @@ -27,7 +27,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; } @@ -65,7 +64,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; } diff --git a/test/fuzztest/setmissioncontinuestate_fuzzer/setmissioncontinuestate_fuzzer.cpp b/test/fuzztest/setmissioncontinuestate_fuzzer/setmissioncontinuestate_fuzzer.cpp index 15c6092e40..5cedeeab3f 100755 --- a/test/fuzztest/setmissioncontinuestate_fuzzer/setmissioncontinuestate_fuzzer.cpp +++ b/test/fuzztest/setmissioncontinuestate_fuzzer/setmissioncontinuestate_fuzzer.cpp @@ -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; } sptr GetFuzzAbilityToken() @@ -80,7 +79,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; } diff --git a/test/fuzztest/setmissionicon_fuzzer/setmissionicon_fuzzer.cpp b/test/fuzztest/setmissionicon_fuzzer/setmissionicon_fuzzer.cpp index 0899cd7fb0..425fd56371 100755 --- a/test/fuzztest/setmissionicon_fuzzer/setmissionicon_fuzzer.cpp +++ b/test/fuzztest/setmissionicon_fuzzer/setmissionicon_fuzzer.cpp @@ -27,7 +27,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } sptr GetFuzzAbilityToken() @@ -78,7 +77,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; } diff --git a/test/fuzztest/setmissionlabel_fuzzer/setmissionlabel_fuzzer.cpp b/test/fuzztest/setmissionlabel_fuzzer/setmissionlabel_fuzzer.cpp index c9119085b9..fee7a8bad2 100755 --- a/test/fuzztest/setmissionlabel_fuzzer/setmissionlabel_fuzzer.cpp +++ b/test/fuzztest/setmissionlabel_fuzzer/setmissionlabel_fuzzer.cpp @@ -27,7 +27,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } sptr GetFuzzAbilityToken() @@ -78,7 +77,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; } diff --git a/test/fuzztest/startability_fuzzer/startability_fuzzer.cpp b/test/fuzztest/startability_fuzzer/startability_fuzzer.cpp index 47cf7980e2..c30ccfec64 100755 --- a/test/fuzztest/startability_fuzzer/startability_fuzzer.cpp +++ b/test/fuzztest/startability_fuzzer/startability_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } sptr GetFuzzAbilityToken() @@ -119,7 +118,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; } diff --git a/test/fuzztest/startabilitybycall_fuzzer/startabilitybycall_fuzzer.cpp b/test/fuzztest/startabilitybycall_fuzzer/startabilitybycall_fuzzer.cpp index 113ee0cd3e..0c63222dab 100755 --- a/test/fuzztest/startabilitybycall_fuzzer/startabilitybycall_fuzzer.cpp +++ b/test/fuzztest/startabilitybycall_fuzzer/startabilitybycall_fuzzer.cpp @@ -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; } class AbilityConnectionFuzz : public IAbilityConnection { @@ -94,7 +93,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; } diff --git a/test/fuzztest/startabilityutils_fuzzer/startabilityutils_fuzzer.cpp b/test/fuzztest/startabilityutils_fuzzer/startabilityutils_fuzzer.cpp index 0be939fea5..e87a3548a5 100755 --- a/test/fuzztest/startabilityutils_fuzzer/startabilityutils_fuzzer.cpp +++ b/test/fuzztest/startabilityutils_fuzzer/startabilityutils_fuzzer.cpp @@ -35,7 +35,6 @@ namespace { constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; constexpr size_t OFFSET_ZERO = 24; @@ -101,7 +100,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; } diff --git a/test/fuzztest/startcontinuation_fuzzer/startcontinuation_fuzzer.cpp b/test/fuzztest/startcontinuation_fuzzer/startcontinuation_fuzzer.cpp index f9f5112cda..5ad1687b23 100755 --- a/test/fuzztest/startcontinuation_fuzzer/startcontinuation_fuzzer.cpp +++ b/test/fuzztest/startcontinuation_fuzzer/startcontinuation_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } sptr GetFuzzAbilityToken() @@ -92,7 +91,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; } diff --git a/test/fuzztest/startotherappinterceptor_fuzzer/startotherappinterceptor_fuzzer.cpp b/test/fuzztest/startotherappinterceptor_fuzzer/startotherappinterceptor_fuzzer.cpp index 950fad5118..c7e003ca6c 100644 --- a/test/fuzztest/startotherappinterceptor_fuzzer/startotherappinterceptor_fuzzer.cpp +++ b/test/fuzztest/startotherappinterceptor_fuzzer/startotherappinterceptor_fuzzer.cpp @@ -32,7 +32,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -96,7 +95,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; } diff --git a/test/fuzztest/startrenderprocess_fuzzer/startrenderprocess_fuzzer.cpp b/test/fuzztest/startrenderprocess_fuzzer/startrenderprocess_fuzzer.cpp index 2189a0bf5d..d3b873af70 100755 --- a/test/fuzztest/startrenderprocess_fuzzer/startrenderprocess_fuzzer.cpp +++ b/test/fuzztest/startrenderprocess_fuzzer/startrenderprocess_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } @@ -65,7 +64,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; } diff --git a/test/fuzztest/startserviceextensionability_fuzzer/startserviceextensionability_fuzzer.cpp b/test/fuzztest/startserviceextensionability_fuzzer/startserviceextensionability_fuzzer.cpp index 794e036ca8..7921cd7b10 100755 --- a/test/fuzztest/startserviceextensionability_fuzzer/startserviceextensionability_fuzzer.cpp +++ b/test/fuzztest/startserviceextensionability_fuzzer/startserviceextensionability_fuzzer.cpp @@ -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) @@ -71,7 +70,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; } diff --git a/test/fuzztest/startspecifiedability_fuzzer/startspecifiedability_fuzzer.cpp b/test/fuzztest/startspecifiedability_fuzzer/startspecifiedability_fuzzer.cpp index e0f3977821..21fc143753 100755 --- a/test/fuzztest/startspecifiedability_fuzzer/startspecifiedability_fuzzer.cpp +++ b/test/fuzztest/startspecifiedability_fuzzer/startspecifiedability_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } @@ -72,7 +71,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; } diff --git a/test/fuzztest/startsyncremotemissions_fuzzer/startsyncremotemissions_fuzzer.cpp b/test/fuzztest/startsyncremotemissions_fuzzer/startsyncremotemissions_fuzzer.cpp index f609d80ab4..a664882cc2 100755 --- a/test/fuzztest/startsyncremotemissions_fuzzer/startsyncremotemissions_fuzzer.cpp +++ b/test/fuzztest/startsyncremotemissions_fuzzer/startsyncremotemissions_fuzzer.cpp @@ -26,7 +26,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr uint8_t ENABLE = 2; } @@ -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; } diff --git a/test/fuzztest/startupresidentprocess_fuzzer/startupresidentprocess_fuzzer.cpp b/test/fuzztest/startupresidentprocess_fuzzer/startupresidentprocess_fuzzer.cpp index e796024321..5afdcb7894 100755 --- a/test/fuzztest/startupresidentprocess_fuzzer/startupresidentprocess_fuzzer.cpp +++ b/test/fuzztest/startupresidentprocess_fuzzer/startupresidentprocess_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } @@ -57,7 +56,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; } diff --git a/test/fuzztest/startuser_fuzzer/startuser_fuzzer.cpp b/test/fuzztest/startuser_fuzzer/startuser_fuzzer.cpp index 44ead5e9c5..ae3cfcda17 100644 --- a/test/fuzztest/startuser_fuzzer/startuser_fuzzer.cpp +++ b/test/fuzztest/startuser_fuzzer/startuser_fuzzer.cpp @@ -26,7 +26,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } uint32_t GetU32Data(const char* ptr) @@ -59,7 +58,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; } diff --git a/test/fuzztest/startusertestprocess_fuzzer/startusertestprocess_fuzzer.cpp b/test/fuzztest/startusertestprocess_fuzzer/startusertestprocess_fuzzer.cpp index 18b1faf321..87e7afaeba 100644 --- a/test/fuzztest/startusertestprocess_fuzzer/startusertestprocess_fuzzer.cpp +++ b/test/fuzztest/startusertestprocess_fuzzer/startusertestprocess_fuzzer.cpp @@ -33,7 +33,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -87,7 +86,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; } diff --git a/test/fuzztest/statusbardelegatemanager_fuzzer/statusbardelegatemanager_fuzzer.cpp b/test/fuzztest/statusbardelegatemanager_fuzzer/statusbardelegatemanager_fuzzer.cpp index 32b39ee60e..716f1050eb 100644 --- a/test/fuzztest/statusbardelegatemanager_fuzzer/statusbardelegatemanager_fuzzer.cpp +++ b/test/fuzztest/statusbardelegatemanager_fuzzer/statusbardelegatemanager_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } @@ -59,7 +58,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; } diff --git a/test/fuzztest/stopserviceability_fuzzer/stopserviceability_fuzzer.cpp b/test/fuzztest/stopserviceability_fuzzer/stopserviceability_fuzzer.cpp index 299bf7a7db..5044e92b7a 100644 --- a/test/fuzztest/stopserviceability_fuzzer/stopserviceability_fuzzer.cpp +++ b/test/fuzztest/stopserviceability_fuzzer/stopserviceability_fuzzer.cpp @@ -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) @@ -67,7 +66,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; } diff --git a/test/fuzztest/stopserviceextensionability_fuzzer/stopserviceextensionability_fuzzer.cpp b/test/fuzztest/stopserviceextensionability_fuzzer/stopserviceextensionability_fuzzer.cpp index 16c943c0a9..6408bc7991 100644 --- a/test/fuzztest/stopserviceextensionability_fuzzer/stopserviceextensionability_fuzzer.cpp +++ b/test/fuzztest/stopserviceextensionability_fuzzer/stopserviceextensionability_fuzzer.cpp @@ -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) @@ -69,7 +68,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; } diff --git a/test/fuzztest/stopsyncremotemissions_fuzzer/stopsyncremotemissions_fuzzer.cpp b/test/fuzztest/stopsyncremotemissions_fuzzer/stopsyncremotemissions_fuzzer.cpp index ddf53c04d2..7077a6b966 100644 --- a/test/fuzztest/stopsyncremotemissions_fuzzer/stopsyncremotemissions_fuzzer.cpp +++ b/test/fuzztest/stopsyncremotemissions_fuzzer/stopsyncremotemissions_fuzzer.cpp @@ -26,7 +26,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) @@ -53,7 +52,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; } diff --git a/test/fuzztest/stopuser_fuzzer/stopuser_fuzzer.cpp b/test/fuzztest/stopuser_fuzzer/stopuser_fuzzer.cpp index 60ab9e6867..9565d8338d 100644 --- a/test/fuzztest/stopuser_fuzzer/stopuser_fuzzer.cpp +++ b/test/fuzztest/stopuser_fuzzer/stopuser_fuzzer.cpp @@ -26,7 +26,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } uint32_t GetU32Data(const char* ptr) @@ -64,7 +63,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; } diff --git a/test/fuzztest/systemabilitytokencallbackstub_fuzzer/systemabilitytokencallbackstub_fuzzer.cpp b/test/fuzztest/systemabilitytokencallbackstub_fuzzer/systemabilitytokencallbackstub_fuzzer.cpp index 3756708bf1..e65a3419f4 100644 --- a/test/fuzztest/systemabilitytokencallbackstub_fuzzer/systemabilitytokencallbackstub_fuzzer.cpp +++ b/test/fuzztest/systemabilitytokencallbackstub_fuzzer/systemabilitytokencallbackstub_fuzzer.cpp @@ -26,7 +26,6 @@ using namespace OHOS::AAFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; const std::u16string ABILITYMGR_INTERFACE_TOKEN = u"ohos.aafwk.ISystemAbilityTokenCallback"; } @@ -79,7 +78,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; } diff --git a/test/fuzztest/terminateability_fuzzer/terminateability_fuzzer.cpp b/test/fuzztest/terminateability_fuzzer/terminateability_fuzzer.cpp index 81b9436542..08b8df296d 100644 --- a/test/fuzztest/terminateability_fuzzer/terminateability_fuzzer.cpp +++ b/test/fuzztest/terminateability_fuzzer/terminateability_fuzzer.cpp @@ -29,7 +29,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) @@ -90,7 +89,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; } diff --git a/test/fuzztest/testobserverstub_fuzzer/testobserverstub_fuzzer.cpp b/test/fuzztest/testobserverstub_fuzzer/testobserverstub_fuzzer.cpp index cf2b18025a..56be89e194 100644 --- a/test/fuzztest/testobserverstub_fuzzer/testobserverstub_fuzzer.cpp +++ b/test/fuzztest/testobserverstub_fuzzer/testobserverstub_fuzzer.cpp @@ -34,7 +34,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -76,7 +75,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; } diff --git a/test/fuzztest/toolstestobserver_fuzzer/toolstestobserver_fuzzer.cpp b/test/fuzztest/toolstestobserver_fuzzer/toolstestobserver_fuzzer.cpp index 156f4dc7bb..66b15b5dd7 100644 --- a/test/fuzztest/toolstestobserver_fuzzer/toolstestobserver_fuzzer.cpp +++ b/test/fuzztest/toolstestobserver_fuzzer/toolstestobserver_fuzzer.cpp @@ -31,7 +31,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -73,7 +72,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; } diff --git a/test/fuzztest/uiabilitylifecyclemanagera_fuzzer/uiabilitylifecyclemanagera_fuzzer.cpp b/test/fuzztest/uiabilitylifecyclemanagera_fuzzer/uiabilitylifecyclemanagera_fuzzer.cpp index 056ff9abff..8abaa0e986 100644 --- a/test/fuzztest/uiabilitylifecyclemanagera_fuzzer/uiabilitylifecyclemanagera_fuzzer.cpp +++ b/test/fuzztest/uiabilitylifecyclemanagera_fuzzer/uiabilitylifecyclemanagera_fuzzer.cpp @@ -33,7 +33,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -162,7 +161,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; } diff --git a/test/fuzztest/uiabilitylifecyclemanagerb_fuzzer/uiabilitylifecyclemanagerb_fuzzer.cpp b/test/fuzztest/uiabilitylifecyclemanagerb_fuzzer/uiabilitylifecyclemanagerb_fuzzer.cpp index 8c79e109ba..a7fb814e11 100644 --- a/test/fuzztest/uiabilitylifecyclemanagerb_fuzzer/uiabilitylifecyclemanagerb_fuzzer.cpp +++ b/test/fuzztest/uiabilitylifecyclemanagerb_fuzzer/uiabilitylifecyclemanagerb_fuzzer.cpp @@ -34,7 +34,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -149,7 +148,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; } diff --git a/test/fuzztest/uiextensionrecordfactory_fuzzer/uiextensionrecordfactory_fuzzer.cpp b/test/fuzztest/uiextensionrecordfactory_fuzzer/uiextensionrecordfactory_fuzzer.cpp index 4f163d1627..43a99e4dea 100644 --- a/test/fuzztest/uiextensionrecordfactory_fuzzer/uiextensionrecordfactory_fuzzer.cpp +++ b/test/fuzztest/uiextensionrecordfactory_fuzzer/uiextensionrecordfactory_fuzzer.cpp @@ -33,7 +33,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -72,7 +71,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; } diff --git a/test/fuzztest/unlockmissionforcleanup_fuzzer/unlockmissionforcleanup_fuzzer.cpp b/test/fuzztest/unlockmissionforcleanup_fuzzer/unlockmissionforcleanup_fuzzer.cpp index 73453adaec..e4ace3bfef 100644 --- a/test/fuzztest/unlockmissionforcleanup_fuzzer/unlockmissionforcleanup_fuzzer.cpp +++ b/test/fuzztest/unlockmissionforcleanup_fuzzer/unlockmissionforcleanup_fuzzer.cpp @@ -26,7 +26,6 @@ using namespace OHOS::AppExecFwk; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } uint32_t GetU32Data(const char* ptr) @@ -59,7 +58,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; } diff --git a/test/fuzztest/unregisterabilitylifecyclecallback_fuzzer/unregisterabilitylifecyclecallback_fuzzer.cpp b/test/fuzztest/unregisterabilitylifecyclecallback_fuzzer/unregisterabilitylifecyclecallback_fuzzer.cpp index e0402d315f..a1198a3ccc 100644 --- a/test/fuzztest/unregisterabilitylifecyclecallback_fuzzer/unregisterabilitylifecyclecallback_fuzzer.cpp +++ b/test/fuzztest/unregisterabilitylifecyclecallback_fuzzer/unregisterabilitylifecyclecallback_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AbilityRuntime; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } class AbilityLifecycleCallbackFuzz : public AbilityLifecycleCallback { @@ -73,7 +72,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; } diff --git a/test/fuzztest/unregisterapplicationstateobserver_fuzzer/unregisterapplicationstateobserver_fuzzer.cpp b/test/fuzztest/unregisterapplicationstateobserver_fuzzer/unregisterapplicationstateobserver_fuzzer.cpp index 2b575039d3..b53034bebf 100644 --- a/test/fuzztest/unregisterapplicationstateobserver_fuzzer/unregisterapplicationstateobserver_fuzzer.cpp +++ b/test/fuzztest/unregisterapplicationstateobserver_fuzzer/unregisterapplicationstateobserver_fuzzer.cpp @@ -29,7 +29,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) @@ -58,7 +57,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; } diff --git a/test/fuzztest/unregisterenvironmentcallback_fuzzer/unregisterenvironmentcallback_fuzzer.cpp b/test/fuzztest/unregisterenvironmentcallback_fuzzer/unregisterenvironmentcallback_fuzzer.cpp index 2b709c19a0..0f92369e19 100644 --- a/test/fuzztest/unregisterenvironmentcallback_fuzzer/unregisterenvironmentcallback_fuzzer.cpp +++ b/test/fuzztest/unregisterenvironmentcallback_fuzzer/unregisterenvironmentcallback_fuzzer.cpp @@ -28,7 +28,6 @@ using namespace OHOS::AbilityRuntime; namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; } class EnvironmentCallbackFuzz : public EnvironmentCallback { @@ -61,7 +60,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; } diff --git a/test/fuzztest/unregistermissionlistener_fuzzer/unregistermissionlistener_fuzzer.cpp b/test/fuzztest/unregistermissionlistener_fuzzer/unregistermissionlistener_fuzzer.cpp index 65eddc1e5a..80056bed69 100644 --- a/test/fuzztest/unregistermissionlistener_fuzzer/unregistermissionlistener_fuzzer.cpp +++ b/test/fuzztest/unregistermissionlistener_fuzzer/unregistermissionlistener_fuzzer.cpp @@ -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; } class MissionListenerFuzz : public IMissionListener { @@ -85,7 +84,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; } diff --git a/test/fuzztest/updateabilitystate_fuzzer/updateabilitystate_fuzzer.cpp b/test/fuzztest/updateabilitystate_fuzzer/updateabilitystate_fuzzer.cpp index 6d227486ee..a174a681ed 100644 --- a/test/fuzztest/updateabilitystate_fuzzer/updateabilitystate_fuzzer.cpp +++ b/test/fuzztest/updateabilitystate_fuzzer/updateabilitystate_fuzzer.cpp @@ -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; } @@ -82,7 +81,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; } diff --git a/test/fuzztest/updateconfiguration_fuzzer/updateconfiguration_fuzzer.cpp b/test/fuzztest/updateconfiguration_fuzzer/updateconfiguration_fuzzer.cpp index 8090cbf08a..371bd73d0c 100644 --- a/test/fuzztest/updateconfiguration_fuzzer/updateconfiguration_fuzzer.cpp +++ b/test/fuzztest/updateconfiguration_fuzzer/updateconfiguration_fuzzer.cpp @@ -27,7 +27,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) @@ -64,7 +63,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; } diff --git a/test/fuzztest/updateextensionstate_fuzzer/updateextensionstate_fuzzer.cpp b/test/fuzztest/updateextensionstate_fuzzer/updateextensionstate_fuzzer.cpp index 8fd7e129a3..2ce68e2ae3 100644 --- a/test/fuzztest/updateextensionstate_fuzzer/updateextensionstate_fuzzer.cpp +++ b/test/fuzztest/updateextensionstate_fuzzer/updateextensionstate_fuzzer.cpp @@ -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; } @@ -82,7 +81,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; } diff --git a/test/fuzztest/usercallbackstub_fuzzer/usercallbackstub_fuzzer.cpp b/test/fuzztest/usercallbackstub_fuzzer/usercallbackstub_fuzzer.cpp index 2d9693914f..a5bfb07a14 100644 --- a/test/fuzztest/usercallbackstub_fuzzer/usercallbackstub_fuzzer.cpp +++ b/test/fuzztest/usercallbackstub_fuzzer/usercallbackstub_fuzzer.cpp @@ -33,7 +33,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int INPUT_TWO = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -86,7 +85,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; } diff --git a/test/fuzztest/wantagenthelpertrigger_fuzzer/wantagenthelpertrigger_fuzzer.cpp b/test/fuzztest/wantagenthelpertrigger_fuzzer/wantagenthelpertrigger_fuzzer.cpp index 9df5ed83a1..4891df6e5e 100644 --- a/test/fuzztest/wantagenthelpertrigger_fuzzer/wantagenthelpertrigger_fuzzer.cpp +++ b/test/fuzztest/wantagenthelpertrigger_fuzzer/wantagenthelpertrigger_fuzzer.cpp @@ -29,7 +29,6 @@ using namespace OHOS::AbilityRuntime::WantAgent; #define DISABLE_FUZZ namespace OHOS { namespace { -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; const std::string GET_BUNDLE_INFO_PERMISSION = "ohos.permission.GET_BUNDLE_INFO"; } @@ -84,7 +83,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; } diff --git a/test/fuzztest/wantsenderstub_fuzzer/wantsenderstub_fuzzer.cpp b/test/fuzztest/wantsenderstub_fuzzer/wantsenderstub_fuzzer.cpp index 0e9fe32a8c..d733068a59 100644 --- a/test/fuzztest/wantsenderstub_fuzzer/wantsenderstub_fuzzer.cpp +++ b/test/fuzztest/wantsenderstub_fuzzer/wantsenderstub_fuzzer.cpp @@ -30,7 +30,6 @@ constexpr int INPUT_ZERO = 0; constexpr int INPUT_ONE = 1; constexpr int ENABLE = 2; constexpr int INPUT_THREE = 3; -constexpr size_t FOO_MAX_LEN = 1024; constexpr size_t U32_AT_SIZE = 4; constexpr size_t OFFSET_ZERO = 24; constexpr size_t OFFSET_ONE = 16; @@ -83,7 +82,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; }