Fix the warning error for memcpy 44/308444/2 accepted/tizen/unified/20240401.165624 accepted/tizen/unified/x/20240326.073837
authorDohyun Pyun <dh79.pyun@samsung.com>
Mon, 25 Mar 2024 22:38:05 +0000 (07:38 +0900)
committerDohyun Pyun <dh79.pyun@samsung.com>
Mon, 25 Mar 2024 22:38:46 +0000 (07:38 +0900)
Change-Id: Ib6d7a256439f82cfec64aa52f57d5cd73958d3ef
Signed-off-by: Dohyun Pyun <dh79.pyun@samsung.com>
tests/test/uat-scenarios.c

index 13954ab86b32dbadbf8b5a082acdaf264361f1ee..a033e2445673f2da186c09d1aaaeef685f2d5428 100755 (executable)
@@ -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: