From f1b7850aefed1b0bee9c996fd2be97b620cf7cf2 Mon Sep 17 00:00:00 2001 From: Dohyun Pyun Date: Tue, 26 Mar 2024 07:38:05 +0900 Subject: [PATCH] Fix the warning error for memcpy Change-Id: Ib6d7a256439f82cfec64aa52f57d5cd73958d3ef Signed-off-by: Dohyun Pyun --- tests/test/uat-scenarios.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test/uat-scenarios.c b/tests/test/uat-scenarios.c index 13954ab..a033e24 100755 --- a/tests/test/uat-scenarios.c +++ b/tests/test/uat-scenarios.c @@ -79,7 +79,7 @@ static int __uat_scenario_service_startup() if (UA_ERROR_NONE == ret) { memset(g_service_str, 0, MENU_DATA_SIZE + 1); - memcpy(g_service_str, svc_name, MENU_DATA_SIZE); + memcpy(g_service_str, svc_name, strlen(svc_name)); } ret = ua_set_detection_cycle(g_service_h, detection_cycle); @@ -122,7 +122,7 @@ static int __uat_scenario_user_startup() if (UA_ERROR_NONE == ret) { memset(g_user_account_str, 0, MENU_DATA_SIZE + 1); - memcpy(g_user_account_str, user_account, MENU_DATA_SIZE); + memcpy(g_user_account_str, user_account, strlen(user_account)); } done: -- 2.34.1