[bluetooth] svace issue fixed. 05/63205/1
authorSudha Bheemanna <b.sudha@samsung.com>
Tue, 22 Mar 2016 13:40:50 +0000 (19:10 +0530)
committerSudha Bheemanna <b.sudha@samsung.com>
Tue, 22 Mar 2016 13:40:50 +0000 (19:10 +0530)
Change-Id: Ia644da896675c01a273bac25662c9ad98f02799f
Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
test/bt_unit_test.c

index 2eba166..c2a6e61 100755 (executable)
@@ -2303,7 +2303,7 @@ int test_set_params(int test_id, char *param)
 
                        if (param_index > 0) {
                                g_test_param.params[param_index - 1] = g_malloc0(strlen(param) + 1);
-                               strcpy(g_test_param.params[param_index - 1], param);
+                               strncpy(g_test_param.params[param_index - 1], param, strlen(param));
                        }
 
                        if (param_index == g_test_param.param_count) {
@@ -2332,7 +2332,7 @@ int test_set_params(int test_id, char *param)
 
                        if (param_index > 0) {
                                g_test_param.params[param_index - 1] = g_malloc0(strlen(param) + 1);
-                               strcpy(g_test_param.params[param_index - 1], param);
+                               strncpy(g_test_param.params[param_index - 1], param, strlen(param));
                        }
 
                        if (param_index == g_test_param.param_count) {
@@ -2376,7 +2376,7 @@ int test_set_params(int test_id, char *param)
 
                        if (param_index > 0) {
                                g_test_param.params[param_index - 1] = g_malloc0(strlen(param) + 1);
-                               strcpy(g_test_param.params[param_index - 1], param);
+                               strncpy(g_test_param.params[param_index - 1], param, strlen(param));
                        }
 
                        if (param_index == g_test_param.param_count) {
@@ -6928,7 +6928,6 @@ int main()
 {
        GIOChannel *key_io;
 
-//     g_type_init();
        current_tc_table = BT_UNIT_TEST_TABLE_MAIN;
 
        key_io = g_io_channel_unix_new(fileno(stdin));