[Fix Crash] g_free crash issue __test_stc_restriction_info_cb. 22/133622/2
authorNishant Chaprana <n.chaprana@samsung.com>
Tue, 13 Jun 2017 03:06:18 +0000 (08:36 +0530)
committerNishant Chaprana <n.chaprana@samsung.com>
Tue, 13 Jun 2017 03:14:58 +0000 (08:44 +0530)
Description: This crash occured due to garbage value initialization
in app_id, iface_name, imsi due to which g_free was crashing.

Change-Id: Ic6d1c9ee361968eeefe7344fa0d9ee8c8e819649
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
packaging/capi-network-stc.spec
test/restriction.c

index f02b5852d50ec73ee042597ff545fa2a7e045b57..db48f250b350d263aac98179d94481bcc30dd3a3 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       capi-network-stc
 Summary:    A Smart Traffic Control (STC) libraries in Native API
-Version:    0.0.10
+Version:    0.0.11
 Release:    1
 Group:      Network & Connectivity/API
 License:    Apache-2.0
index dc57f245d0bbcf3d039131b8e775134ea35af970..a5c0951cdef98f6c057aceb27c4b1b71eadcf63a 100755 (executable)
@@ -65,9 +65,9 @@ static stc_callback_ret_e __test_stc_restriction_info_cb(
        }
 
        int ret = STC_ERROR_NONE;
-       char *app_id;
-       char *iface_name;
-       char *imsi;
+       char *app_id = NULL;
+       char *iface_name = NULL;
+       char *imsi = NULL;
        stc_restriction_status_e rst_status;
        stc_iface_type_e iface_type;
        int64_t rx_limit;