From c6888d428e7a1aa0248f159e9b4815b7043fea48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=87=E6=99=96?= Date: Mon, 1 Sep 2025 01:57:40 +0000 Subject: [PATCH 1/2] update common/src/ipc/standard/ipc_model_codec.cpp. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王宇晖 --- common/src/ipc/standard/ipc_model_codec.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/src/ipc/standard/ipc_model_codec.cpp b/common/src/ipc/standard/ipc_model_codec.cpp index 2e336c5fd..d5376c7d5 100644 --- a/common/src/ipc/standard/ipc_model_codec.cpp +++ b/common/src/ipc/standard/ipc_model_codec.cpp @@ -426,6 +426,10 @@ bool IpcModelCodec::DecodeLocalServiceInfos(MessageParcel &parcel, std::vector IPC_VECTOR_MAX_SIZE || num < 0) { + LOGE("num is Invalid value, num = %{public}u", num); + return false; + } for (uint32_t k = 0; k < num; k++) { DMLocalServiceInfo serviceInfo; bRet = DecodeLocalServiceInfo(parcel, serviceInfo); @@ -482,7 +486,7 @@ bool IpcModelCodec::DecodeStringVector(MessageParcel &parcel, std::vector IPC_VECTOR_MAX_SIZE) { + if (num > IPC_VECTOR_MAX_SIZE || num < 0) { LOGE("num is Invalid value, num = %{public}u", num); return false; } -- Gitee From 3750d25f4f1346db4da96772060703933d994822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AE=87=E6=99=96?= Date: Mon, 1 Sep 2025 01:59:07 +0000 Subject: [PATCH 2/2] update services/implementation/include/ability/dm_dialog_manager.h. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王宇晖 --- services/implementation/include/ability/dm_dialog_manager.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/implementation/include/ability/dm_dialog_manager.h b/services/implementation/include/ability/dm_dialog_manager.h index 2b2ad90f2..22f002b95 100644 --- a/services/implementation/include/ability/dm_dialog_manager.h +++ b/services/implementation/include/ability/dm_dialog_manager.h @@ -56,8 +56,8 @@ private: std::string customDescriptionStr_; std::string pinCode_; std::string hostPkgLabel_; - int32_t deviceType_; - bool isProxyBind_; + int32_t deviceType_ = -1; + bool isProxyBind_ = false; std::string appUserData_; std::string title_; std::mutex mutex_; -- Gitee