diff --git a/frameworks/security_component/src/sec_comp_click_event_parcel.cpp b/frameworks/security_component/src/sec_comp_click_event_parcel.cpp index 52f4bdf4c38fb95b63c52e549fdb703e226e6549..e580dc21c3d72aadf6e8f91b003430666afc66fa 100644 --- a/frameworks/security_component/src/sec_comp_click_event_parcel.cpp +++ b/frameworks/security_component/src/sec_comp_click_event_parcel.cpp @@ -122,7 +122,6 @@ SecCompClickEventParcel* SecCompClickEventParcel::Unmarshalling(Parcel& in) SC_LOG_ERROR(LABEL, "Alloc policy parcel fail"); return nullptr; } - SecCompClickEvent clickInfo; int32_t type; if (!in.ReadInt32(type)) { @@ -131,7 +130,6 @@ SecCompClickEventParcel* SecCompClickEventParcel::Unmarshalling(Parcel& in) return nullptr; } clickInfo.type = static_cast(type); - if (clickInfo.type == ClickEventType::POINT_EVENT_TYPE) { if (!UnmarshallingPointEvent(in, clickInfo)) { delete clickInfoParcel; @@ -153,7 +151,6 @@ SecCompClickEventParcel* SecCompClickEventParcel::Unmarshalling(Parcel& in) delete clickInfoParcel; return nullptr; } - if (clickInfo.extraInfo.dataSize == 0) { clickInfoParcel->clickInfoParams_ = clickInfo; return clickInfoParcel; @@ -162,14 +159,12 @@ SecCompClickEventParcel* SecCompClickEventParcel::Unmarshalling(Parcel& in) delete clickInfoParcel; return nullptr; } - clickInfo.extraInfo.data = const_cast(in.ReadBuffer(clickInfo.extraInfo.dataSize)); if (clickInfo.extraInfo.data == nullptr) { SC_LOG_ERROR(LABEL, "Read extraInfo data failed"); delete clickInfoParcel; return nullptr; } - clickInfoParcel->clickInfoParams_ = clickInfo; return clickInfoParcel; }