From e3560fde76812f7eba31dcc887a6a9da79e4dd18 Mon Sep 17 00:00:00 2001 From: y1585740638 Date: Mon, 21 Aug 2023 14:48:03 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E7=BD=B2=E6=B5=81=E6=B0=B4=E7=BA=BF?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: y1585740638 --- patches/patches.json | 9 +++++++++ .../sa/sa_main/sec_comp_entity.cpp | 9 +++++---- 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 patches/patches.json diff --git a/patches/patches.json b/patches/patches.json new file mode 100644 index 0000000..3fd8b02 --- /dev/null +++ b/patches/patches.json @@ -0,0 +1,9 @@ +{ + "patches": [ + { + "project":"productdefine_common", + "path":"productdefine/common", + "pr_url":"https://gitee.com/openharmony/productdefine_common/pulls/693" + } + ] +} \ No newline at end of file diff --git a/services/security_component_service/sa/sa_main/sec_comp_entity.cpp b/services/security_component_service/sa/sa_main/sec_comp_entity.cpp index aec385a..32c18dd 100644 --- a/services/security_component_service/sa/sa_main/sec_comp_entity.cpp +++ b/services/security_component_service/sa/sa_main/sec_comp_entity.cpp @@ -57,8 +57,8 @@ bool SecCompEntity::CheckTouchInfo(const SecCompClickEvent& touchInfo) const auto current = static_cast( std::chrono::high_resolution_clock::now().time_since_epoch().count()) / TIME_CONVERSION_UNIT; if (touchInfo.timestamp < current - MAX_TOUCH_INTERVAL || touchInfo.timestamp > current) { - SC_LOG_ERROR(LABEL, "touch timestamp invalid touchInfo. timestamp: %{public}lu, current: %{public}lu", - touchInfo.timestamp, current); + SC_LOG_ERROR(LABEL, "touch timestamp invalid touchInfo. timestamp: %{public}llu, current: %{public}llu", + static_cast(touchInfo.timestamp), static_cast(current)); return false; } @@ -70,8 +70,9 @@ bool SecCompEntity::CheckTouchInfo(const SecCompClickEvent& touchInfo) const int32_t res = SecCompEnhanceAdapter::CheckExtraInfo(touchInfo); if ((res != SC_OK) && (res != SC_ENHANCE_ERROR_NOT_EXIST_ENHANCE)) { SC_LOG_ERROR(LABEL, "HMAC checkout failed" - "touchX:%{public}f, touchY:%{public}f, timestamp:%{public}lu, dataSize:%{public}d", - touchInfo.touchX, touchInfo.touchY, touchInfo.timestamp, touchInfo.extraInfo.dataSize); + "touchX:%{public}f, touchY:%{public}f, timestamp:%{public}llu, dataSize:%{public}d", + touchInfo.touchX, touchInfo.touchY, static_cast(touchInfo.timestamp), + touchInfo.extraInfo.dataSize); HiSysEventWrite(HiviewDFX::HiSysEvent::Domain::SEC_COMPONENT, "CLICK_INFO_CHECK_FAILED", HiviewDFX::HiSysEvent::EventType::SECURITY, "CALLER_UID", IPCSkeleton::GetCallingUid(), "CALLER_PID", IPCSkeleton::GetCallingPid(), "SC_ID", scId_, "SC_TYPE", componentInfo_->type_); -- Gitee