diff --git a/test/fuzztest/agentstub_fuzzer/agentstub_fuzzer.cpp b/test/fuzztest/agentstub_fuzzer/agentstub_fuzzer.cpp index 01c4af52162139290bab795b5a63bee85f770254..de352d05353fed3c8a1b7ee89785587473ae5d47 100644 --- a/test/fuzztest/agentstub_fuzzer/agentstub_fuzzer.cpp +++ b/test/fuzztest/agentstub_fuzzer/agentstub_fuzzer.cpp @@ -26,7 +26,8 @@ namespace OHOS { constexpr size_t THRESHOLD = 10; constexpr int32_t OFFSET = 4; const std::u16string AGENTSTUB_INTERFACE_TOKEN = u"OHOS.MiscServices.IInputMethodAgent"; - +constexpr uint32_t CODE_MIN = 0; +constexpr uint32_t CODE_MAX = static_cast(IInputMethodAgentIpcCode::COMMAND_SEND_MESSAGE) + 1; uint32_t ConvertToUint32(const uint8_t *ptr) { if (ptr == nullptr) { @@ -38,7 +39,7 @@ uint32_t ConvertToUint32(const uint8_t *ptr) bool FuzzAgentStub(const uint8_t *rawData, size_t size) { - uint32_t code = ConvertToUint32(rawData); + uint32_t code = static_cast(*rawData) % (CODE_MAX - CODE_MIN + 1) + CODE_MIN; rawData = rawData + OFFSET; size = size - OFFSET; diff --git a/test/fuzztest/corestub_fuzzer/corestub_fuzzer.cpp b/test/fuzztest/corestub_fuzzer/corestub_fuzzer.cpp index 7d5d7c6bb45c00bdc8d8acb9116fbae5be80b782..e1613a142344d89d4944fad78b18ec7b94f8a3ac 100644 --- a/test/fuzztest/corestub_fuzzer/corestub_fuzzer.cpp +++ b/test/fuzztest/corestub_fuzzer/corestub_fuzzer.cpp @@ -26,7 +26,8 @@ namespace OHOS { constexpr size_t THRESHOLD = 10; constexpr int32_t OFFSET = 4; const std::u16string CORESTUB_INTERFACE_TOKEN = u"OHOS.MiscServices.IInputMethodCore"; - +constexpr uint32_t CODE_MIN = 0; +constexpr uint32_t CODE_MAX = static_cast(IInputMethodCoreIpcCode::COMMAND_ON_SEND_PRIVATE_DATA) + 1; uint32_t ConvertToUint32(const uint8_t *ptr) { if (ptr == nullptr) { @@ -38,7 +39,7 @@ uint32_t ConvertToUint32(const uint8_t *ptr) bool FuzzCoreStub(const uint8_t *rawData, size_t size) { - uint32_t code = ConvertToUint32(rawData); + uint32_t code = static_cast(*rawData) % (CODE_MAX - CODE_MIN + 1) + CODE_MIN; rawData = rawData + OFFSET; size = size - OFFSET; diff --git a/test/fuzztest/datachannelstub_fuzzer/datachannelstub_fuzzer.cpp b/test/fuzztest/datachannelstub_fuzzer/datachannelstub_fuzzer.cpp index 8f47ee5ae4f827e9c7c85b124baf5f4ae1238544..27aa44c76c0d4bae61e04e339ab131ebcad276ef 100644 --- a/test/fuzztest/datachannelstub_fuzzer/datachannelstub_fuzzer.cpp +++ b/test/fuzztest/datachannelstub_fuzzer/datachannelstub_fuzzer.cpp @@ -27,7 +27,8 @@ namespace OHOS { constexpr size_t THRESHOLD = 10; constexpr int32_t OFFSET = 4; const std::u16string DATACHANNEL_INTERFACE_TOKEN = u"OHOS.MiscServices.IInputDataChannel"; - +constexpr uint32_t CODE_MIN = 0; +constexpr uint32_t CODE_MAX = static_cast(IInputDataChannelIpcCode::COMMAND_SEND_MESSAGE) + 1; uint32_t ConvertToUint32(const uint8_t *ptr) { if (ptr == nullptr) { @@ -39,7 +40,7 @@ uint32_t ConvertToUint32(const uint8_t *ptr) bool FuzzDataChannelStub(const uint8_t *rawData, size_t size) { - uint32_t code = ConvertToUint32(rawData); + uint32_t code = static_cast(*rawData) % (CODE_MAX - CODE_MIN + 1) + CODE_MIN; rawData = rawData + OFFSET; size = size - OFFSET; diff --git a/test/fuzztest/inputclientstub_fuzzer/inputclientstub_fuzzer.cpp b/test/fuzztest/inputclientstub_fuzzer/inputclientstub_fuzzer.cpp index d6b7d382eb18bbdba1badc14512843771177453c..e2cb031c56fe7fc9c214da7e4b58c938aaee40fd 100644 --- a/test/fuzztest/inputclientstub_fuzzer/inputclientstub_fuzzer.cpp +++ b/test/fuzztest/inputclientstub_fuzzer/inputclientstub_fuzzer.cpp @@ -28,7 +28,8 @@ namespace OHOS { constexpr size_t THRESHOLD = 10; constexpr int32_t OFFSET = 4; const std::u16string INPUTCLIENTSTUB_INTERFACE_TOKEN = u"OHOS.MiscServices.IInputClient"; - +constexpr uint32_t CODE_MIN = 0; +constexpr uint32_t CODE_MAX = static_cast(IInputClientIpcCode::COMMAND_DEACTIVATE_CLIENT) + 1; uint32_t ConvertToUint32(const uint8_t *ptr) { if (ptr == nullptr) { @@ -40,7 +41,7 @@ uint32_t ConvertToUint32(const uint8_t *ptr) void FuzzInputClientStub(const uint8_t *rawData, size_t size) { - uint32_t code = ConvertToUint32(rawData); + uint32_t code = static_cast(*rawData) % (CODE_MAX - CODE_MIN + 1) + CODE_MIN; rawData = rawData + OFFSET; size = size - OFFSET; diff --git a/test/fuzztest/inputmethodsystemability_fuzzer/inputmethodsystemability_fuzzer.cpp b/test/fuzztest/inputmethodsystemability_fuzzer/inputmethodsystemability_fuzzer.cpp index c5c1b859a12872cc1228c83e58006caa65e1cdc7..aa5e524f59cadb8fa403f3da42162576740a9bdd 100644 --- a/test/fuzztest/inputmethodsystemability_fuzzer/inputmethodsystemability_fuzzer.cpp +++ b/test/fuzztest/inputmethodsystemability_fuzzer/inputmethodsystemability_fuzzer.cpp @@ -69,6 +69,30 @@ void FuzzOnUser(int32_t userId, const std::string &packageName) DelayedSingleton::GetInstance()->OnPackageRemoved(userId, bundleName); } +void FuzzOnScreenUnlock() +{ + DelayedSingleton::GetInstance()->OnScreenUnlock(nullptr); + + MessageParcel *parcel = nullptr; + auto msg = std::make_shared(MessageID::MSG_ID_SCREEN_UNLOCK, parcel); + DelayedSingleton::GetInstance()->OnScreenUnlock(msg.get()); + + MessageParcel *parcel1 = new (std::nothrow) MessageParcel(); + msg = std::make_shared(MessageID::MSG_ID_SCREEN_UNLOCK, parcel1); + DelayedSingleton::GetInstance()->OnScreenUnlock(msg.get()); + + MessageParcel *parcel2 = new (std::nothrow) MessageParcel(); + msg = std::make_shared(MessageID::MSG_ID_SCREEN_UNLOCK, parcel2); + DelayedSingleton::GetInstance()->OnScreenUnlock(msg.get()); +} + +void SystemAbility(const uint8_t *data, size_t size) +{ + auto fuzzedUint32 = static_cast(size); + DelayedSingleton::GetInstance()->HideInput(nullptr); + DelayedSingleton::GetInstance()->ReleaseInput(nullptr, fuzzedUint32); + DelayedSingleton::GetInstance()->SetCoreAndAgent(nullptr, nullptr); +} } // namespace OHOS /* Fuzzer entry point */ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) @@ -78,5 +102,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) std::string fuzzedString(reinterpret_cast(data), size); OHOS::FuzzOnUser(userId, fuzzedString); + OHOS::FuzzOnScreenUnlock(); + OHOS::SystemAbility(data, size); return 0; } diff --git a/test/fuzztest/systemabilitystubfuzztest/BUILD.gn b/test/fuzztest/systemabilitystubfuzztest/BUILD.gn index d211d4b21f2b419bd8bd77291fca3bcc0e1940e5..6f21e109b35dcfe3a315b3ec6acb61f4e9295936 100644 --- a/test/fuzztest/systemabilitystubfuzztest/BUILD.gn +++ b/test/fuzztest/systemabilitystubfuzztest/BUILD.gn @@ -52,6 +52,18 @@ group("system_ability_stub_fuzztest") { ":SwitchInputMethodFuzzTest", ":UnRegisteredProxyImeFuzzTest", ":UpdateListenEventFlagFuzzTest", + ":CommandIsCurrentImeByPidFuzzTest", + ":CommandIsDefaultImeSetFuzzTest", + ":CommandIsSystemAppSetFuzzTest", + ":CommandGetInputMethodStateFuzzTest", + ":CommandHideCurrentInputDeprecatedFuzzTest", + ":CommandInitConnectFuzzTest", + ":CommandSetCallingWindowFuzzTest", + ":CommandGetInputStartInfoFuzzTest", + ":CommandRegisterProxyImeFuzzTest", + ":CommandUnregisterProxyImeFuzzTest", + ":CommandSendPrivateDataFuzzTest", + ":CommandEnableImeFuzzTest", ] } @@ -641,3 +653,207 @@ ohos_fuzztest("ConnectSystemCmdFuzzTest") { external_deps = common_external_deps } + +ohos_fuzztest("CommandIsCurrentImeByPidFuzzTest") { + module_out_path = "imf/imf" + + fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandiscurrentimebypid_fuzzer" + + include_dirs = [ + "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandiscurrentimebypid_fuzzer", + "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common", + ] + + sources = [ "commandiscurrentimebypid_fuzzer/commandiscurrentimebypid_fuzzer.cpp" ] + + deps = common_deps + + external_deps = common_external_deps +} + +ohos_fuzztest("CommandIsDefaultImeSetFuzzTest") { + module_out_path = "imf/imf" + + fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandisdefaultimeset_fuzzer" + + include_dirs = [ + "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandisdefaultimeset_fuzzer", + "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common", + ] + + sources = [ "commandisdefaultimeset_fuzzer/commandisdefaultimeset_fuzzer.cpp" ] + + deps = common_deps + + external_deps = common_external_deps +} + +ohos_fuzztest("CommandIsSystemAppSetFuzzTest") { + module_out_path = "imf/imf" + + fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandissystemappset_fuzzer" + + include_dirs = [ + "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandissystemappset_fuzzer", + "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common", + ] + + sources = [ "commandissystemappset_fuzzer/commandissystemappset_fuzzer.cpp" ] + + deps = common_deps + + external_deps = common_external_deps +} + +ohos_fuzztest("CommandGetInputMethodStateFuzzTest") { + module_out_path = "imf/imf" + + fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandgetinputmethodstate_fuzzer" + + include_dirs = [ + "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandgetinputmethodstate_fuzzer", + "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common", + ] + + sources = [ "commandgetinputmethodstate_fuzzer/commandgetinputmethodstate_fuzzer.cpp" ] + + deps = common_deps + + external_deps = common_external_deps +} + +ohos_fuzztest("CommandHideCurrentInputDeprecatedFuzzTest") { + module_out_path = "imf/imf" + + fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandhidecurrentinputdeprecated_fuzzer" + + include_dirs = [ + "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandhidecurrentinputdeprecated_fuzzer", + "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common", + ] + + sources = [ "commandhidecurrentinputdeprecated_fuzzer/commandhidecurrentinputdeprecated_fuzzer.cpp" ] + + deps = common_deps + + external_deps = common_external_deps +} + +ohos_fuzztest("CommandInitConnectFuzzTest") { + module_out_path = "imf/imf" + + fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandinitconnect_fuzzer" + + include_dirs = [ + "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandinitconnect_fuzzer", + "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common", + ] + + sources = [ "commandinitconnect_fuzzer/commandinitconnect_fuzzer.cpp" ] + + deps = common_deps + + external_deps = common_external_deps +} + +ohos_fuzztest("CommandSetCallingWindowFuzzTest") { + module_out_path = "imf/imf" + + fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandsetcallingwindow_fuzzer" + + include_dirs = [ + "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandsetcallingwindow_fuzzer", + "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common", + ] + + sources = [ "commandsetcallingwindow_fuzzer/commandsetcallingwindow_fuzzer.cpp" ] + + deps = common_deps + + external_deps = common_external_deps +} + +ohos_fuzztest("CommandGetInputStartInfoFuzzTest") { + module_out_path = "imf/imf" + + fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandgetinputstartinfo_fuzzer" + + include_dirs = [ + "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandgetinputstartinfo_fuzzer", + "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common", + ] + + sources = [ "commandgetinputstartinfo_fuzzer/commandgetinputstartinfo_fuzzer.cpp" ] + + deps = common_deps + + external_deps = common_external_deps +} + +ohos_fuzztest("CommandRegisterProxyImeFuzzTest") { + module_out_path = "imf/imf" + + fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandregisterproxyime_fuzzer" + + include_dirs = [ + "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandregisterproxyime_fuzzer", + "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common", + ] + + sources = [ "commandregisterproxyime_fuzzer/commandregisterproxyime_fuzzer.cpp" ] + + deps = common_deps + + external_deps = common_external_deps +} + +ohos_fuzztest("CommandUnregisterProxyImeFuzzTest") { + module_out_path = "imf/imf" + + fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandunregisterproxyime_fuzzer" + + include_dirs = [ + "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandunregisterproxyime_fuzzer", + "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common", + ] + + sources = [ "commandunregisterproxyime_fuzzer/commandunregisterproxyime_fuzzer.cpp" ] + + deps = common_deps + + external_deps = common_external_deps +} + +ohos_fuzztest("CommandSendPrivateDataFuzzTest") { + module_out_path = "imf/imf" + + fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandsendprivatedata_fuzzer" + + include_dirs = [ + "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandsendprivatedata_fuzzer", + "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common", + ] + + sources = [ "commandsendprivatedata_fuzzer/commandsendprivatedata_fuzzer.cpp" ] + + deps = common_deps + + external_deps = common_external_deps +} + +ohos_fuzztest("CommandEnableImeFuzzTest") { + module_out_path = "imf/imf" + + fuzz_config_file = "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandenableime_fuzzer" + + include_dirs = [ + "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/commandenableime_fuzzer", + "${inputmethod_path}/test/fuzztest/systemabilitystubfuzztest/common", + ] + + sources = [ "commandenableime_fuzzer/commandenableime_fuzzer.cpp" ] + + deps = common_deps + + external_deps = common_external_deps +} \ No newline at end of file diff --git a/test/fuzztest/systemabilitystubfuzztest/commandenableime_fuzzer/commandenableime_fuzzer.cpp b/test/fuzztest/systemabilitystubfuzztest/commandenableime_fuzzer/commandenableime_fuzzer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..5416700ec9a2602e00db6b9d7718420ec376ecad --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandenableime_fuzzer/commandenableime_fuzzer.cpp @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2023-2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "commandenableime_fuzzer.h" + +#include "imf_sa_stub_fuzz_util.h" + +using namespace OHOS::MiscServices; +namespace OHOS { +} // namespace OHOS +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ + /* Run your code on data */ + ImfSaStubFuzzUtil::FuzzInputMethodSystemAbility(data, size, + IInputMethodSystemAbilityIpcCode::COMMAND_ENABLE_IME); + return 0; +} diff --git a/test/fuzztest/systemabilitystubfuzztest/commandenableime_fuzzer/commandenableime_fuzzer.h b/test/fuzztest/systemabilitystubfuzztest/commandenableime_fuzzer/commandenableime_fuzzer.h new file mode 100644 index 0000000000000000000000000000000000000000..e3066fe62f760794012566ba480b7aa7443a2c8b --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandenableime_fuzzer/commandenableime_fuzzer.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H +#define TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H + +#define FUZZ_PROJECT_NAME "commandenableime_fuzzer" + +#endif // TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H diff --git a/test/fuzztest/systemabilitystubfuzztest/commandenableime_fuzzer/corpus/init b/test/fuzztest/systemabilitystubfuzztest/commandenableime_fuzzer/corpus/init new file mode 100644 index 0000000000000000000000000000000000000000..e4ceac1bcd4e3b3427eb63cea0c28304064333cc --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandenableime_fuzzer/corpus/init @@ -0,0 +1,14 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/systemabilitystubfuzztest/commandenableime_fuzzer/project.xml b/test/fuzztest/systemabilitystubfuzztest/commandenableime_fuzzer/project.xml new file mode 100644 index 0000000000000000000000000000000000000000..4fdbc407f205680885fa42663163b5c987f123a6 --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandenableime_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 1000 + + 300 + + 4096 + + diff --git a/test/fuzztest/systemabilitystubfuzztest/commandgetinputmethodstate_fuzzer/commandgetinputmethodstate_fuzzer.cpp b/test/fuzztest/systemabilitystubfuzztest/commandgetinputmethodstate_fuzzer/commandgetinputmethodstate_fuzzer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..abfd0980ce787e4882bf126bdc073f48cdd04edd --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandgetinputmethodstate_fuzzer/commandgetinputmethodstate_fuzzer.cpp @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2023-2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "commandgetinputmethodstate_fuzzer.h" + +#include "imf_sa_stub_fuzz_util.h" + +using namespace OHOS::MiscServices; +namespace OHOS { +} // namespace OHOS +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ + /* Run your code on data */ + ImfSaStubFuzzUtil::FuzzInputMethodSystemAbility(data, size, + IInputMethodSystemAbilityIpcCode::COMMAND_GET_INPUT_METHOD_STATE); + return 0; +} diff --git a/test/fuzztest/systemabilitystubfuzztest/commandgetinputmethodstate_fuzzer/commandgetinputmethodstate_fuzzer.h b/test/fuzztest/systemabilitystubfuzztest/commandgetinputmethodstate_fuzzer/commandgetinputmethodstate_fuzzer.h new file mode 100644 index 0000000000000000000000000000000000000000..ca402a0fda3640bd742cbe6cf1ec748045033330 --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandgetinputmethodstate_fuzzer/commandgetinputmethodstate_fuzzer.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H +#define TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H + +#define FUZZ_PROJECT_NAME "commandgetinputmethodstate_fuzzer" + +#endif // TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H diff --git a/test/fuzztest/systemabilitystubfuzztest/commandgetinputmethodstate_fuzzer/corpus/init b/test/fuzztest/systemabilitystubfuzztest/commandgetinputmethodstate_fuzzer/corpus/init new file mode 100644 index 0000000000000000000000000000000000000000..e4ceac1bcd4e3b3427eb63cea0c28304064333cc --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandgetinputmethodstate_fuzzer/corpus/init @@ -0,0 +1,14 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/systemabilitystubfuzztest/commandgetinputmethodstate_fuzzer/project.xml b/test/fuzztest/systemabilitystubfuzztest/commandgetinputmethodstate_fuzzer/project.xml new file mode 100644 index 0000000000000000000000000000000000000000..4fdbc407f205680885fa42663163b5c987f123a6 --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandgetinputmethodstate_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 1000 + + 300 + + 4096 + + diff --git a/test/fuzztest/systemabilitystubfuzztest/commandgetinputstartinfo_fuzzer/commandgetinputstartinfo_fuzzer.cpp b/test/fuzztest/systemabilitystubfuzztest/commandgetinputstartinfo_fuzzer/commandgetinputstartinfo_fuzzer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cebae1fefa5088e115494e8f7387d5baccc67e5e --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandgetinputstartinfo_fuzzer/commandgetinputstartinfo_fuzzer.cpp @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2023-2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "commandgetinputstartinfo_fuzzer.h" + +#include "imf_sa_stub_fuzz_util.h" + +using namespace OHOS::MiscServices; +namespace OHOS { +} // namespace OHOS +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ + /* Run your code on data */ + ImfSaStubFuzzUtil::FuzzInputMethodSystemAbility(data, size, + IInputMethodSystemAbilityIpcCode::COMMAND_GET_INPUT_START_INFO); + return 0; +} diff --git a/test/fuzztest/systemabilitystubfuzztest/commandgetinputstartinfo_fuzzer/commandgetinputstartinfo_fuzzer.h b/test/fuzztest/systemabilitystubfuzztest/commandgetinputstartinfo_fuzzer/commandgetinputstartinfo_fuzzer.h new file mode 100644 index 0000000000000000000000000000000000000000..6df59942b21647d3e3b0dc628abaaa80739883dc --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandgetinputstartinfo_fuzzer/commandgetinputstartinfo_fuzzer.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H +#define TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H + +#define FUZZ_PROJECT_NAME "commandgetinputstartinfo_fuzzer" + +#endif // TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H diff --git a/test/fuzztest/systemabilitystubfuzztest/commandgetinputstartinfo_fuzzer/corpus/init b/test/fuzztest/systemabilitystubfuzztest/commandgetinputstartinfo_fuzzer/corpus/init new file mode 100644 index 0000000000000000000000000000000000000000..e4ceac1bcd4e3b3427eb63cea0c28304064333cc --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandgetinputstartinfo_fuzzer/corpus/init @@ -0,0 +1,14 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/systemabilitystubfuzztest/commandgetinputstartinfo_fuzzer/project.xml b/test/fuzztest/systemabilitystubfuzztest/commandgetinputstartinfo_fuzzer/project.xml new file mode 100644 index 0000000000000000000000000000000000000000..4fdbc407f205680885fa42663163b5c987f123a6 --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandgetinputstartinfo_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 1000 + + 300 + + 4096 + + diff --git a/test/fuzztest/systemabilitystubfuzztest/commandhidecurrentinputdeprecated_fuzzer/commandhidecurrentinputdeprecated_fuzzer.cpp b/test/fuzztest/systemabilitystubfuzztest/commandhidecurrentinputdeprecated_fuzzer/commandhidecurrentinputdeprecated_fuzzer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bb96b007eba5b725ef0bae7a01b612d4d2b2e986 --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandhidecurrentinputdeprecated_fuzzer/commandhidecurrentinputdeprecated_fuzzer.cpp @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2023-2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "commandhidecurrentinputdeprecated_fuzzer.h" + +#include "imf_sa_stub_fuzz_util.h" + +using namespace OHOS::MiscServices; +namespace OHOS { +} // namespace OHOS +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ + /* Run your code on data */ + ImfSaStubFuzzUtil::FuzzInputMethodSystemAbility(data, size, + IInputMethodSystemAbilityIpcCode::COMMAND_HIDE_CURRENT_INPUT_DEPRECATED); + return 0; +} diff --git a/test/fuzztest/systemabilitystubfuzztest/commandhidecurrentinputdeprecated_fuzzer/commandhidecurrentinputdeprecated_fuzzer.h b/test/fuzztest/systemabilitystubfuzztest/commandhidecurrentinputdeprecated_fuzzer/commandhidecurrentinputdeprecated_fuzzer.h new file mode 100644 index 0000000000000000000000000000000000000000..b7e4d37e3256355ceeb1fe9c585a50892328e9dd --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandhidecurrentinputdeprecated_fuzzer/commandhidecurrentinputdeprecated_fuzzer.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H +#define TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H + +#define FUZZ_PROJECT_NAME "commandhidecurrentinputdeprecated_fuzzer" + +#endif // TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H diff --git a/test/fuzztest/systemabilitystubfuzztest/commandhidecurrentinputdeprecated_fuzzer/corpus/init b/test/fuzztest/systemabilitystubfuzztest/commandhidecurrentinputdeprecated_fuzzer/corpus/init new file mode 100644 index 0000000000000000000000000000000000000000..e4ceac1bcd4e3b3427eb63cea0c28304064333cc --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandhidecurrentinputdeprecated_fuzzer/corpus/init @@ -0,0 +1,14 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/systemabilitystubfuzztest/commandhidecurrentinputdeprecated_fuzzer/project.xml b/test/fuzztest/systemabilitystubfuzztest/commandhidecurrentinputdeprecated_fuzzer/project.xml new file mode 100644 index 0000000000000000000000000000000000000000..4fdbc407f205680885fa42663163b5c987f123a6 --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandhidecurrentinputdeprecated_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 1000 + + 300 + + 4096 + + diff --git a/test/fuzztest/systemabilitystubfuzztest/commandinitconnect_fuzzer/commandinitconnect_fuzzer.cpp b/test/fuzztest/systemabilitystubfuzztest/commandinitconnect_fuzzer/commandinitconnect_fuzzer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..24eb1c38e45ec24e1b3dc240dc2669dd62af7ee0 --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandinitconnect_fuzzer/commandinitconnect_fuzzer.cpp @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2023-2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "commandinitconnect_fuzzer.h" + +#include "imf_sa_stub_fuzz_util.h" + +using namespace OHOS::MiscServices; +namespace OHOS { +} // namespace OHOS +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ + /* Run your code on data */ + ImfSaStubFuzzUtil::FuzzInputMethodSystemAbility(data, size, + IInputMethodSystemAbilityIpcCode::COMMAND_INIT_CONNECT); + return 0; +} diff --git a/test/fuzztest/systemabilitystubfuzztest/commandinitconnect_fuzzer/commandinitconnect_fuzzer.h b/test/fuzztest/systemabilitystubfuzztest/commandinitconnect_fuzzer/commandinitconnect_fuzzer.h new file mode 100644 index 0000000000000000000000000000000000000000..ce9463cf0dcf6740d3d43632aa68f3736e29ccd9 --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandinitconnect_fuzzer/commandinitconnect_fuzzer.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H +#define TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H + +#define FUZZ_PROJECT_NAME "commandinitconnect_fuzzer" + +#endif // TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H diff --git a/test/fuzztest/systemabilitystubfuzztest/commandinitconnect_fuzzer/corpus/init b/test/fuzztest/systemabilitystubfuzztest/commandinitconnect_fuzzer/corpus/init new file mode 100644 index 0000000000000000000000000000000000000000..e4ceac1bcd4e3b3427eb63cea0c28304064333cc --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandinitconnect_fuzzer/corpus/init @@ -0,0 +1,14 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/systemabilitystubfuzztest/commandinitconnect_fuzzer/project.xml b/test/fuzztest/systemabilitystubfuzztest/commandinitconnect_fuzzer/project.xml new file mode 100644 index 0000000000000000000000000000000000000000..4fdbc407f205680885fa42663163b5c987f123a6 --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandinitconnect_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 1000 + + 300 + + 4096 + + diff --git a/test/fuzztest/systemabilitystubfuzztest/commandiscurrentimebypid_fuzzer/commandiscurrentimebypid_fuzzer.cpp b/test/fuzztest/systemabilitystubfuzztest/commandiscurrentimebypid_fuzzer/commandiscurrentimebypid_fuzzer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2290e999afdc6ffca8871be251463951a6618a6f --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandiscurrentimebypid_fuzzer/commandiscurrentimebypid_fuzzer.cpp @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2023-2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "commandiscurrentimebypid_fuzzer.h" + +#include "imf_sa_stub_fuzz_util.h" + +using namespace OHOS::MiscServices; +namespace OHOS { +} // namespace OHOS +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ + /* Run your code on data */ + ImfSaStubFuzzUtil::FuzzInputMethodSystemAbility(data, size, + IInputMethodSystemAbilityIpcCode::COMMAND_IS_CURRENT_IME_BY_PID); + return 0; +} diff --git a/test/fuzztest/systemabilitystubfuzztest/commandiscurrentimebypid_fuzzer/commandiscurrentimebypid_fuzzer.h b/test/fuzztest/systemabilitystubfuzztest/commandiscurrentimebypid_fuzzer/commandiscurrentimebypid_fuzzer.h new file mode 100644 index 0000000000000000000000000000000000000000..2229ee51d60fcbd77ef23bae452b01fa4a3232a5 --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandiscurrentimebypid_fuzzer/commandiscurrentimebypid_fuzzer.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H +#define TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H + +#define FUZZ_PROJECT_NAME "commandiscurrentimebypid_fuzzer" + +#endif // TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H diff --git a/test/fuzztest/systemabilitystubfuzztest/commandiscurrentimebypid_fuzzer/corpus/init b/test/fuzztest/systemabilitystubfuzztest/commandiscurrentimebypid_fuzzer/corpus/init new file mode 100644 index 0000000000000000000000000000000000000000..e4ceac1bcd4e3b3427eb63cea0c28304064333cc --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandiscurrentimebypid_fuzzer/corpus/init @@ -0,0 +1,14 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/systemabilitystubfuzztest/commandiscurrentimebypid_fuzzer/project.xml b/test/fuzztest/systemabilitystubfuzztest/commandiscurrentimebypid_fuzzer/project.xml new file mode 100644 index 0000000000000000000000000000000000000000..4fdbc407f205680885fa42663163b5c987f123a6 --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandiscurrentimebypid_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 1000 + + 300 + + 4096 + + diff --git a/test/fuzztest/systemabilitystubfuzztest/commandisdefaultimeset_fuzzer/commandisdefaultimeset_fuzzer.cpp b/test/fuzztest/systemabilitystubfuzztest/commandisdefaultimeset_fuzzer/commandisdefaultimeset_fuzzer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..cf9db3328236371cd9f52e8add64f014a2dee3df --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandisdefaultimeset_fuzzer/commandisdefaultimeset_fuzzer.cpp @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2023-2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "commandisdefaultimeset_fuzzer.h" + +#include "imf_sa_stub_fuzz_util.h" + +using namespace OHOS::MiscServices; +namespace OHOS { +} // namespace OHOS +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ + /* Run your code on data */ + ImfSaStubFuzzUtil::FuzzInputMethodSystemAbility(data, size, + IInputMethodSystemAbilityIpcCode::COMMAND_IS_DEFAULT_IME_SET); + return 0; +} diff --git a/test/fuzztest/systemabilitystubfuzztest/commandisdefaultimeset_fuzzer/commandisdefaultimeset_fuzzer.h b/test/fuzztest/systemabilitystubfuzztest/commandisdefaultimeset_fuzzer/commandisdefaultimeset_fuzzer.h new file mode 100644 index 0000000000000000000000000000000000000000..bd65a26561bb03d0f5da312428755ae97171177c --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandisdefaultimeset_fuzzer/commandisdefaultimeset_fuzzer.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H +#define TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H + +#define FUZZ_PROJECT_NAME "commandisdefaultimeset_fuzzer" + +#endif // TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H diff --git a/test/fuzztest/systemabilitystubfuzztest/commandisdefaultimeset_fuzzer/corpus/init b/test/fuzztest/systemabilitystubfuzztest/commandisdefaultimeset_fuzzer/corpus/init new file mode 100644 index 0000000000000000000000000000000000000000..e4ceac1bcd4e3b3427eb63cea0c28304064333cc --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandisdefaultimeset_fuzzer/corpus/init @@ -0,0 +1,14 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/systemabilitystubfuzztest/commandisdefaultimeset_fuzzer/project.xml b/test/fuzztest/systemabilitystubfuzztest/commandisdefaultimeset_fuzzer/project.xml new file mode 100644 index 0000000000000000000000000000000000000000..4fdbc407f205680885fa42663163b5c987f123a6 --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandisdefaultimeset_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 1000 + + 300 + + 4096 + + diff --git a/test/fuzztest/systemabilitystubfuzztest/commandissystemappset_fuzzer/commandissystemappset_fuzzer.cpp b/test/fuzztest/systemabilitystubfuzztest/commandissystemappset_fuzzer/commandissystemappset_fuzzer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f4f2b34376d405aeb04832a05778bbfcc10fbb3f --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandissystemappset_fuzzer/commandissystemappset_fuzzer.cpp @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2023-2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "commandissystemappset_fuzzer.h" + +#include "imf_sa_stub_fuzz_util.h" + +using namespace OHOS::MiscServices; +namespace OHOS { +} // namespace OHOS +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ + /* Run your code on data */ + ImfSaStubFuzzUtil::FuzzInputMethodSystemAbility(data, size, + IInputMethodSystemAbilityIpcCode::COMMAND_IS_SYSTEM_APP); + return 0; +} diff --git a/test/fuzztest/systemabilitystubfuzztest/commandissystemappset_fuzzer/commandissystemappset_fuzzer.h b/test/fuzztest/systemabilitystubfuzztest/commandissystemappset_fuzzer/commandissystemappset_fuzzer.h new file mode 100644 index 0000000000000000000000000000000000000000..3ce0cba759e4ff075728e4c6b966b6a8411fa468 --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandissystemappset_fuzzer/commandissystemappset_fuzzer.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H +#define TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H + +#define FUZZ_PROJECT_NAME "commandissystemappset_fuzzer" + +#endif // TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H diff --git a/test/fuzztest/systemabilitystubfuzztest/commandissystemappset_fuzzer/corpus/init b/test/fuzztest/systemabilitystubfuzztest/commandissystemappset_fuzzer/corpus/init new file mode 100644 index 0000000000000000000000000000000000000000..e4ceac1bcd4e3b3427eb63cea0c28304064333cc --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandissystemappset_fuzzer/corpus/init @@ -0,0 +1,14 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/systemabilitystubfuzztest/commandissystemappset_fuzzer/project.xml b/test/fuzztest/systemabilitystubfuzztest/commandissystemappset_fuzzer/project.xml new file mode 100644 index 0000000000000000000000000000000000000000..4fdbc407f205680885fa42663163b5c987f123a6 --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandissystemappset_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 1000 + + 300 + + 4096 + + diff --git a/test/fuzztest/systemabilitystubfuzztest/commandregisterproxyime_fuzzer/commandregisterproxyime_fuzzer.cpp b/test/fuzztest/systemabilitystubfuzztest/commandregisterproxyime_fuzzer/commandregisterproxyime_fuzzer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e386f92d9e800b1e4143856df773aa11a62c3660 --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandregisterproxyime_fuzzer/commandregisterproxyime_fuzzer.cpp @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2023-2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "commandregisterproxyime_fuzzer.h" + +#include "imf_sa_stub_fuzz_util.h" + +using namespace OHOS::MiscServices; +namespace OHOS { +} // namespace OHOS +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ + /* Run your code on data */ + ImfSaStubFuzzUtil::FuzzInputMethodSystemAbility(data, size, + IInputMethodSystemAbilityIpcCode::COMMAND_REGISTER_PROXY_IME); + return 0; +} diff --git a/test/fuzztest/systemabilitystubfuzztest/commandregisterproxyime_fuzzer/commandregisterproxyime_fuzzer.h b/test/fuzztest/systemabilitystubfuzztest/commandregisterproxyime_fuzzer/commandregisterproxyime_fuzzer.h new file mode 100644 index 0000000000000000000000000000000000000000..ab6f46f10e27a69d0ef0ff3235920e409b6f5794 --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandregisterproxyime_fuzzer/commandregisterproxyime_fuzzer.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H +#define TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H + +#define FUZZ_PROJECT_NAME "commandregisterproxyime_fuzzer" + +#endif // TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H diff --git a/test/fuzztest/systemabilitystubfuzztest/commandregisterproxyime_fuzzer/corpus/init b/test/fuzztest/systemabilitystubfuzztest/commandregisterproxyime_fuzzer/corpus/init new file mode 100644 index 0000000000000000000000000000000000000000..e4ceac1bcd4e3b3427eb63cea0c28304064333cc --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandregisterproxyime_fuzzer/corpus/init @@ -0,0 +1,14 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/systemabilitystubfuzztest/commandregisterproxyime_fuzzer/project.xml b/test/fuzztest/systemabilitystubfuzztest/commandregisterproxyime_fuzzer/project.xml new file mode 100644 index 0000000000000000000000000000000000000000..4fdbc407f205680885fa42663163b5c987f123a6 --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandregisterproxyime_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 1000 + + 300 + + 4096 + + diff --git a/test/fuzztest/systemabilitystubfuzztest/commandsendprivatedata_fuzzer/commandsendprivatedata_fuzzer.cpp b/test/fuzztest/systemabilitystubfuzztest/commandsendprivatedata_fuzzer/commandsendprivatedata_fuzzer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a4bfabc27f021430e00c9fe3446503e0c14cc8b6 --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandsendprivatedata_fuzzer/commandsendprivatedata_fuzzer.cpp @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2023-2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "commandsendprivatedata_fuzzer.h" + +#include "imf_sa_stub_fuzz_util.h" + +using namespace OHOS::MiscServices; +namespace OHOS { +} // namespace OHOS +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ + /* Run your code on data */ + ImfSaStubFuzzUtil::FuzzInputMethodSystemAbility(data, size, + IInputMethodSystemAbilityIpcCode::COMMAND_SEND_PRIVATE_DATA); + return 0; +} diff --git a/test/fuzztest/systemabilitystubfuzztest/commandsendprivatedata_fuzzer/commandsendprivatedata_fuzzer.h b/test/fuzztest/systemabilitystubfuzztest/commandsendprivatedata_fuzzer/commandsendprivatedata_fuzzer.h new file mode 100644 index 0000000000000000000000000000000000000000..6178b940ed5a7600b4b6bf797a9b96f1a12f6b95 --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandsendprivatedata_fuzzer/commandsendprivatedata_fuzzer.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H +#define TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H + +#define FUZZ_PROJECT_NAME "commandsendprivatedata_fuzzer" + +#endif // TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H diff --git a/test/fuzztest/systemabilitystubfuzztest/commandsendprivatedata_fuzzer/corpus/init b/test/fuzztest/systemabilitystubfuzztest/commandsendprivatedata_fuzzer/corpus/init new file mode 100644 index 0000000000000000000000000000000000000000..e4ceac1bcd4e3b3427eb63cea0c28304064333cc --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandsendprivatedata_fuzzer/corpus/init @@ -0,0 +1,14 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/systemabilitystubfuzztest/commandsendprivatedata_fuzzer/project.xml b/test/fuzztest/systemabilitystubfuzztest/commandsendprivatedata_fuzzer/project.xml new file mode 100644 index 0000000000000000000000000000000000000000..4fdbc407f205680885fa42663163b5c987f123a6 --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandsendprivatedata_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 1000 + + 300 + + 4096 + + diff --git a/test/fuzztest/systemabilitystubfuzztest/commandsetcallingwindow_fuzzer/commandsetcallingwindow_fuzzer.cpp b/test/fuzztest/systemabilitystubfuzztest/commandsetcallingwindow_fuzzer/commandsetcallingwindow_fuzzer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..428f4af4271177891566b359bbb1bc8483e472ed --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandsetcallingwindow_fuzzer/commandsetcallingwindow_fuzzer.cpp @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2023-2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "commandsetcallingwindow_fuzzer.h" + +#include "imf_sa_stub_fuzz_util.h" + +using namespace OHOS::MiscServices; +namespace OHOS { +} // namespace OHOS +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ + /* Run your code on data */ + ImfSaStubFuzzUtil::FuzzInputMethodSystemAbility(data, size, + IInputMethodSystemAbilityIpcCode::COMMAND_SET_CALLING_WINDOW); + return 0; +} diff --git a/test/fuzztest/systemabilitystubfuzztest/commandsetcallingwindow_fuzzer/commandsetcallingwindow_fuzzer.h b/test/fuzztest/systemabilitystubfuzztest/commandsetcallingwindow_fuzzer/commandsetcallingwindow_fuzzer.h new file mode 100644 index 0000000000000000000000000000000000000000..5d03ea78f22d6f3c315939b15a8d03ad439e517e --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandsetcallingwindow_fuzzer/commandsetcallingwindow_fuzzer.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H +#define TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H + +#define FUZZ_PROJECT_NAME "commandsetcallingwindow_fuzzer" + +#endif // TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H diff --git a/test/fuzztest/systemabilitystubfuzztest/commandsetcallingwindow_fuzzer/corpus/init b/test/fuzztest/systemabilitystubfuzztest/commandsetcallingwindow_fuzzer/corpus/init new file mode 100644 index 0000000000000000000000000000000000000000..e4ceac1bcd4e3b3427eb63cea0c28304064333cc --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandsetcallingwindow_fuzzer/corpus/init @@ -0,0 +1,14 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/systemabilitystubfuzztest/commandsetcallingwindow_fuzzer/project.xml b/test/fuzztest/systemabilitystubfuzztest/commandsetcallingwindow_fuzzer/project.xml new file mode 100644 index 0000000000000000000000000000000000000000..4fdbc407f205680885fa42663163b5c987f123a6 --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandsetcallingwindow_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 1000 + + 300 + + 4096 + + diff --git a/test/fuzztest/systemabilitystubfuzztest/commandunregisterproxyime_fuzzer/commandunregisterproxyime_fuzzer.cpp b/test/fuzztest/systemabilitystubfuzztest/commandunregisterproxyime_fuzzer/commandunregisterproxyime_fuzzer.cpp new file mode 100644 index 0000000000000000000000000000000000000000..46d4d8b0a257aee500e32e0ba8beaf169e1a18c1 --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandunregisterproxyime_fuzzer/commandunregisterproxyime_fuzzer.cpp @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2023-2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "commandunregisterproxyime_fuzzer.h" + +#include "imf_sa_stub_fuzz_util.h" + +using namespace OHOS::MiscServices; +namespace OHOS { +} // namespace OHOS +/* Fuzzer entry point */ +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) +{ + /* Run your code on data */ + ImfSaStubFuzzUtil::FuzzInputMethodSystemAbility(data, size, + IInputMethodSystemAbilityIpcCode::COMMAND_UNREGISTER_PROXY_IME); + return 0; +} diff --git a/test/fuzztest/systemabilitystubfuzztest/commandunregisterproxyime_fuzzer/commandunregisterproxyime_fuzzer.h b/test/fuzztest/systemabilitystubfuzztest/commandunregisterproxyime_fuzzer/commandunregisterproxyime_fuzzer.h new file mode 100644 index 0000000000000000000000000000000000000000..73552569ca909acb99fd9c6871fdf199807e1fb8 --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandunregisterproxyime_fuzzer/commandunregisterproxyime_fuzzer.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H +#define TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H + +#define FUZZ_PROJECT_NAME "commandunregisterproxyime_fuzzer" + +#endif // TEST_FUZZTEST_UPDATELISTENEVENTFLAG_FUZZER_H diff --git a/test/fuzztest/systemabilitystubfuzztest/commandunregisterproxyime_fuzzer/corpus/init b/test/fuzztest/systemabilitystubfuzztest/commandunregisterproxyime_fuzzer/corpus/init new file mode 100644 index 0000000000000000000000000000000000000000..e4ceac1bcd4e3b3427eb63cea0c28304064333cc --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandunregisterproxyime_fuzzer/corpus/init @@ -0,0 +1,14 @@ +# Copyright (c) 2023 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FUZZ \ No newline at end of file diff --git a/test/fuzztest/systemabilitystubfuzztest/commandunregisterproxyime_fuzzer/project.xml b/test/fuzztest/systemabilitystubfuzztest/commandunregisterproxyime_fuzzer/project.xml new file mode 100644 index 0000000000000000000000000000000000000000..4fdbc407f205680885fa42663163b5c987f123a6 --- /dev/null +++ b/test/fuzztest/systemabilitystubfuzztest/commandunregisterproxyime_fuzzer/project.xml @@ -0,0 +1,25 @@ + + + + + + 1000 + + 300 + + 4096 + +