From b9bc9b84984dc005fadda29aa5b9f8f60a3033d1 Mon Sep 17 00:00:00 2001 From: jiangminsen Date: Tue, 3 Dec 2024 22:03:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=AE=89=E5=85=A8=E5=91=8A?= =?UTF-8?q?=E8=AD=A6-=E5=85=A5=E5=8F=82=E8=BE=B9=E7=95=8C=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: jiangminsen --- services/dbms/src/distributed_bms_host.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/dbms/src/distributed_bms_host.cpp b/services/dbms/src/distributed_bms_host.cpp index fd0a28a..73d6a45 100644 --- a/services/dbms/src/distributed_bms_host.cpp +++ b/services/dbms/src/distributed_bms_host.cpp @@ -239,6 +239,10 @@ bool DistributedBmsHost::GetParcelableInfos(Parcel &data, std::vector &parcel APP_LOGE("GetParcelableInfos elements num exceeds the limit %{public}d", GET_REMOTE_ABILITY_INFO_MAX_SIZE); return false; } + if (infoSize <= 0) { + APP_LOGE("elements num less than or equal to 0"); + return false; + } for (int32_t i = 0; i < infoSize; i++) { std::unique_ptr info(data.ReadParcelable()); if (!info) { -- Gitee