From 33a92b8446f583c307d52bdab3fc3cf2b08f77d8 Mon Sep 17 00:00:00 2001 From: walkerwulei Date: Sun, 2 Jun 2024 15:25:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=8F=E5=88=97=E5=8C=96=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9C=89=E6=95=88=E6=80=A7=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: walkerwulei (cherry picked from commit deb238dc6099ec9fa3eba2250a44702fd32f0be6) --- frameworks/ans/src/notification_live_view_content.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frameworks/ans/src/notification_live_view_content.cpp b/frameworks/ans/src/notification_live_view_content.cpp index a7f1717f7..312d08142 100644 --- a/frameworks/ans/src/notification_live_view_content.cpp +++ b/frameworks/ans/src/notification_live_view_content.cpp @@ -18,6 +18,7 @@ #include "ans_image_util.h" #include "ans_log_wrapper.h" #include "want_params_wrapper.h" +#include "ans_const_define.h" namespace OHOS { namespace Notification { @@ -267,6 +268,10 @@ bool NotificationLiveViewContent::ReadFromParcel(Parcel &parcel) isOnlyLocalUpdate_ = parcel.ReadBool(); uint64_t len = parcel.ReadUint64(); + if (len > MAX_PARCELABLE_VECTOR_NUM) { + ANS_LOGE("Size exceeds the range."); + return false; + } for (uint64_t i = 0; i < len; i++) { auto key = parcel.ReadString(); std::vector strVec; -- Gitee