diff --git a/distributedinput.gni b/distributedinput.gni index 3a1a679fe3666073e2ca864724df4f7f5d5d0c1f..1f7097ebda8b58ef99d5b74c4a4bf223685c7ca0 100644 --- a/distributedinput.gni +++ b/distributedinput.gni @@ -16,8 +16,6 @@ distributedinput_path = "//foundation/distributedhardware/distributed_input" distributedhardwarefwk_path = "//foundation/distributedhardware/distributed_hardware_fwk" -window_manager_path = "//foundation/window/window_manager" - common_path = "${distributedinput_path}/common" utils_path = "${distributedinput_path}/utils" diff --git a/interfaces/ipc/src/start_stop_result_call_back_stub.cpp b/interfaces/ipc/src/start_stop_result_call_back_stub.cpp index f94640aef093a4791a2eb82b6fbc94043eae6db6..5c41b0930b5eca1b65c4fb1f322f3341f0022409 100644 --- a/interfaces/ipc/src/start_stop_result_call_back_stub.cpp +++ b/interfaces/ipc/src/start_stop_result_call_back_stub.cpp @@ -40,8 +40,11 @@ int32_t StartStopResultCallbackStub::OnRemoteRequest( case IStartStopResultCallback::Message::RESULT_START: { std::string srcId = data.ReadString(); std::string sinkId = data.ReadString(); - uint32_t size = data.ReadUint32(); + if (size > IPC_VECTOR_MAX_SIZE) { + DHLOGI("OnRemoteRequest start data size too large."); + return ERR_DH_INPUT_IPC_READ_VALID_FAIL; + } std::vector dhIds; for (uint32_t i = 0; i < size; i++) { std::string dhId = data.ReadString(); @@ -55,6 +58,10 @@ int32_t StartStopResultCallbackStub::OnRemoteRequest( std::string srcId = data.ReadString(); std::string sinkId = data.ReadString(); uint32_t size = data.ReadUint32(); + if (size > IPC_VECTOR_MAX_SIZE) { + DHLOGI("OnRemoteRequest stop data size too large."); + return ERR_DH_INPUT_IPC_READ_VALID_FAIL; + } std::vector dhIds; for (uint32_t i = 0; i < size; i++) { std::string dhId = data.ReadString();