diff --git a/bundle.json b/bundle.json index c4fe00354ffeb185c2fd3524e54fdaabdf216849..f44e25f7a69916bfcb025c0ae7e685c690247a97 100644 --- a/bundle.json +++ b/bundle.json @@ -58,8 +58,7 @@ "hicollie", "resource_management", "screenlock_mgr", - "cJSON", - "idl_tool" + "cJSON" ] }, "build": { diff --git a/test/fuzztest/controlchannelstub_fuzzer/BUILD.gn b/test/fuzztest/controlchannelstub_fuzzer/BUILD.gn index 0ee0423fdac6c05c4f5ef67fae3a3fb630895e6e..d0c82f713f1093427b27a874eaf31341d6ea4ca7 100644 --- a/test/fuzztest/controlchannelstub_fuzzer/BUILD.gn +++ b/test/fuzztest/controlchannelstub_fuzzer/BUILD.gn @@ -35,6 +35,8 @@ ohos_fuzztest("ControlChannelStubFuzzTest") { ] sources = [ + "${inputmethod_path}/frameworks/native/inputmethod_controller/src/input_client_info.cpp", + "${inputmethod_path}/frameworks/native/inputmethod_controller/src/input_method_utils.cpp", "${inputmethod_path}/services/src/input_control_channel_service_impl.cpp", "controlchannelstub_fuzzer.cpp", ] diff --git a/test/fuzztest/imeeventmonitormanager_fuzzer/BUILD.gn b/test/fuzztest/imeeventmonitormanager_fuzzer/BUILD.gn index 2f304578dbc310ebc4bd0e1b1adbe0ba94c9a7aa..b4a518ab353190ba435e62d3246d4f06f6a25a70 100644 --- a/test/fuzztest/imeeventmonitormanager_fuzzer/BUILD.gn +++ b/test/fuzztest/imeeventmonitormanager_fuzzer/BUILD.gn @@ -34,12 +34,18 @@ ohos_fuzztest("ImeEventMonitorManagerFuzzTest") { "-fno-omit-frame-pointer", ] - sources = [ "imeeventmonitormanager_fuzzer.cpp" ] + sources = [ + "${inputmethod_path}/frameworks/native/inputmethod_controller/src/input_client_info.cpp", + "${inputmethod_path}/frameworks/native/inputmethod_controller/src/input_method_utils.cpp", + "imeeventmonitormanager_fuzzer.cpp", + ] deps = [ "${inputmethod_path}/interfaces/inner_api/inputmethod_controller:inputmethod_client", "${inputmethod_path}/test/common:inputmethod_test_common", ] + + external_deps = [ "input:libmmi-client" ] } ############################################################################### diff --git a/test/fuzztest/inputmethodcontroller_fuzzer/inputmethodcontroller_fuzzer.cpp b/test/fuzztest/inputmethodcontroller_fuzzer/inputmethodcontroller_fuzzer.cpp index ec2916df91745cf0c302a018e7a268f70fb20e45..bcd0b276bb3eb7947fcec1dc41a533bc0a3f8217 100644 --- a/test/fuzztest/inputmethodcontroller_fuzzer/inputmethodcontroller_fuzzer.cpp +++ b/test/fuzztest/inputmethodcontroller_fuzzer/inputmethodcontroller_fuzzer.cpp @@ -190,14 +190,6 @@ void FUZZPrintLogIfAceTimeout(sptr imc, int64_t start) { imc->PrintLogIfAceTimeout(start); } - -void FUZZSendPrivateData(sptr imc, const std::string &fuzzedString) -{ - std::unordered_map fuzzedPrivateCommand; - PrivateDataValue privateDataValue = std::string(fuzzedString); - fuzzedPrivateCommand.emplace("value", privateDataValue); - imc->SendPrivateData(fuzzedPrivateCommand); -} } // namespace OHOS /* Fuzzer entry point */ @@ -231,6 +223,5 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) OHOS::FUZZIsPanelShown(imc, data); OHOS::FUZZPrintLogIfAceTimeout(imc, fuzzedint64); OHOS::TestUpdateListenEventFlag(imc, fuzzedUint32); - OHOS::FUZZSendPrivateData(imc, fuzzedString); return 0; } diff --git a/test/fuzztest/systemcmdchannelstub_fuzzer/systemcmdchannelstub_fuzzer.cpp b/test/fuzztest/systemcmdchannelstub_fuzzer/systemcmdchannelstub_fuzzer.cpp index c288c28e8d58bb39ab7907e752e3c6ac1285c29a..ee835674035a81f2a73c253cbc2c93d2983e6e87 100644 --- a/test/fuzztest/systemcmdchannelstub_fuzzer/systemcmdchannelstub_fuzzer.cpp +++ b/test/fuzztest/systemcmdchannelstub_fuzzer/systemcmdchannelstub_fuzzer.cpp @@ -62,7 +62,6 @@ bool FuzzSystemCmdChannelStub(const uint8_t *rawData, size_t size) MessageOption option; sptr stub = new SystemCmdChannelServiceImpl(); - stub->SendPrivateCommand(privateCommand); stub->NotifyPanelStatus(sysPanelStatus); stub->OnRemoteRequest(code, data, reply, option); return true;