From 8553a8d63f97cfa8d64b5b2260e81f8c896a8398 Mon Sep 17 00:00:00 2001 From: nancy.liao <huihui.liao@greentest.com.cn> Date: 周五, 23 5月 2025 18:36:03 +0800 Subject: [PATCH] 修改部分因为标准原因的报错 --- src/library/limits/license_verifier.cpp | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/library/limits/license_verifier.cpp b/src/library/limits/license_verifier.cpp index 86e3181..14e2370 100644 --- a/src/library/limits/license_verifier.cpp +++ b/src/library/limits/license_verifier.cpp @@ -9,9 +9,9 @@ #include <licensecc_properties.h> #include "license_verifier.hpp" -#include "../pc_identifier/pc_identifier_facade.hpp" -#include "../base/StringUtils.h" +#include "../base/string_utils.h" #include "../os/signature_verifier.hpp" +#include "../hw_identifier/hw_identifier_facade.hpp" namespace license { using namespace std; @@ -57,7 +57,7 @@ } const auto client_sig = lic_info.m_limits.find(PARAM_CLIENT_SIGNATURE); if (is_valid && client_sig != lic_info.m_limits.end()) { - const LCC_EVENT_TYPE event = pc_identifier::PcIdentifierFacade::validate_pc_signature(client_sig->second); + const LCC_EVENT_TYPE event = hw_identifier::HwIdentifierFacade::validate_pc_signature(client_sig->second); m_event_registry.addEvent(event, lic_info.source); is_valid = is_valid && (event == LICENSE_OK); } @@ -70,7 +70,7 @@ const auto expiry = fullLicInfo.m_limits.find(PARAM_EXPIRY_DATE); if (expiry != fullLicInfo.m_limits.end()) { - strncpy(info.expiry_date, expiry->second.c_str(), sizeof(info.expiry_date)); + mstrlcpy(info.expiry_date, expiry->second.c_str(), sizeof(info.expiry_date)); info.has_expiry = true; const double secs = difftime(seconds_from_epoch(expiry->second), time(nullptr)); info.days_left = max((int)round(secs / (60 * 60 * 24)), 0); @@ -89,7 +89,7 @@ const auto proprietary_data = fullLicInfo.m_limits.find(PARAM_EXTRA_DATA); if (proprietary_data != fullLicInfo.m_limits.end()) { - strncpy(info.proprietary_data, proprietary_data->second.c_str(), LCC_API_PROPRIETARY_DATA_SIZE); + mstrlcpy(info.proprietary_data, proprietary_data->second.c_str(), sizeof(info.proprietary_data)); } return info; } -- Gitblit v1.9.1