From f847e518dfbc9a642363271fa1d5b0ba864e8ba2 Mon Sep 17 00:00:00 2001 From: renguang1116 Date: Mon, 25 Jul 2022 17:25:50 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90Codex=E3=80=91=E6=B8=85=E7=90=86?= =?UTF-8?q?=E4=B8=8D=E5=AE=89=E5=85=A8=E5=87=BD=E6=95=B0=20Signed-off-by:?= =?UTF-8?q?=20renguang1116=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../device_manager_fa_test/device_manager_fa_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/benchmarktest/device_manager_fa_test/device_manager_fa_test.cpp b/test/benchmarktest/device_manager_fa_test/device_manager_fa_test.cpp index 008b18298..c7b86a12c 100644 --- a/test/benchmarktest/device_manager_fa_test/device_manager_fa_test.cpp +++ b/test/benchmarktest/device_manager_fa_test/device_manager_fa_test.cpp @@ -233,7 +233,7 @@ BENCHMARK_F(DeviceDiscoveryTest, StartDeviceDiscoveryTestCase)( subInfo.freq = DM_HIGH; subInfo.isSameAccount = false; subInfo.isWakeRemote = false; - strcpy(subInfo.capability, DM_CAPABILITY_OSD); + strcpy_s(subInfo.capability, DM_MAX_DEVICE_CAPABILITY_LEN, DM_CAPABILITY_OSD); std::shared_ptr callback = std::make_shared(); int32_t ret = DeviceManager::GetInstance().StartDeviceDiscovery(packageName, subInfo, extra, callback); @@ -261,7 +261,7 @@ BENCHMARK_F(DeviceDiscoveryTest, StoptDeviceDiscoveryTestCase)( subInfo.freq = DM_HIGH; subInfo.isSameAccount = false; subInfo.isWakeRemote = false; - strcpy(subInfo.capability, DM_CAPABILITY_OSD); + strcpy_s(subInfo.capability, DM_MAX_DEVICE_CAPABILITY_LEN, DM_CAPABILITY_OSD); std::shared_ptr callback = std::make_shared(); int32_t ret = DeviceManager::GetInstance().StartDeviceDiscovery(pkgName, subInfo, extra, callback); -- Gitee