diff options
author | saerome.kim <saerome.kim@samsung.com> | 2019-08-14 12:39:35 +0900 |
---|---|---|
committer | saerome.kim <saerome.kim@samsung.com> | 2019-08-14 13:56:05 +0900 |
commit | fde2655973e8b3b482bd01a3011d156d4d439e27 (patch) | |
tree | 8a65bb464d38209786416a69d123972523a7b4e7 /test/uat-devices.c | |
parent | 6492a4f29ba1bc94bad65c6cc5dedb358db3bc39 (diff) | |
download | user-awareness-fde2655973e8b3b482bd01a3011d156d4d439e27.tar.gz user-awareness-fde2655973e8b3b482bd01a3011d156d4d439e27.tar.bz2 user-awareness-fde2655973e8b3b482bd01a3011d156d4d439e27.zip |
backed out the change made according to the security's guideline.
Change-Id: I6ccb0698abcb434f3516717bcb553ca68c01e8bb
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
Diffstat (limited to 'test/uat-devices.c')
-rw-r--r-- | test/uat-devices.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/uat-devices.c b/test/uat-devices.c index dd3086f..0f0a5b1 100644 --- a/test/uat-devices.c +++ b/test/uat-devices.c @@ -301,14 +301,14 @@ static void _update_device_info(void) ret = ua_device_get_mac_type(g_device_h, &mac_type); if (UA_ERROR_NONE == ret) { memset(g_device_type_str, 0, MENU_DATA_SIZE + 1); - snprintf(g_device_type_str, sizeof(g_device_type_str), "%s", + snprintf(g_device_type_str, MENU_DATA_SIZE, "%s", uat_get_mac_type_str(mac_type)); - snprintf(g_device_type, sizeof(g_device_type), "%d", + snprintf(g_device_type, MENU_DATA_SIZE, "%d", _convert_device_type_to_idx(mac_type)); } ret = ua_device_get_os_info(g_device_h, &ostype); - snprintf(g_os_type_str, sizeof(g_os_type_str), "%s", + snprintf(g_os_type_str, MENU_DATA_SIZE, "%s", ostype == 1 ? "Tizen" : ostype == 2 ? "Android" : ostype == 3 ? "iOS" : "N/A"); @@ -393,7 +393,7 @@ static int run_ua_device_destroy( ret = ua_device_destroy(g_device_h); g_device_h = NULL; - snprintf(g_device_type_str, strlen("N/A"), "N/A"); + snprintf(g_device_type_str, MENU_DATA_SIZE, "N/A"); msg(" - ua_device_destroy() ret: [0x%X] [%s]", ret, uat_get_error_str(ret)); @@ -411,7 +411,7 @@ static int run_ua_device_set_mac_type( if (strlen(g_device_type)) { mac_type = (unsigned char)strtol(g_device_type, NULL, 10); - snprintf(g_device_type_str, sizeof(g_device_type_str), "%s", + snprintf(g_device_type_str, MENU_DATA_SIZE, "%s", uat_get_mac_type_str(mac_type)); } @@ -439,7 +439,7 @@ static int run_ua_device_set_os_info( else if (ostype < UA_OS_TYPE_NOT_DEFINE) ostype = UA_OS_TYPE_TIZEN; - snprintf(g_os_type_str, sizeof(g_os_type_str), "%s", + snprintf(g_os_type_str, MENU_DATA_SIZE, "%s", ostype == 1 ? "Tizen" : ostype == 2 ? "Android" : ostype == 3 ? "iOS" : "N/A"); |