Fixed buffer overflow for application id 21/156421/1 accepted/tizen/unified/20171019.060929 submit/tizen/20171018.091936
authorhyunuktak <hyunuk.tak@samsung.com>
Wed, 18 Oct 2017 08:55:37 +0000 (17:55 +0900)
committerhyunuktak <hyunuk.tak@samsung.com>
Wed, 18 Oct 2017 08:55:39 +0000 (17:55 +0900)
Change-Id: I87a3b4485adc9ffbdfbf0ed6337430ca62c2520a
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
packaging/capi-network-stc.spec
src/stc-statistics.c

index 62eff2a..5c6d82d 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       capi-network-stc
 Summary:    A Smart Traffic Control (STC) libraries in Native API
-Version:    0.0.21
+Version:    0.0.22
 Release:    1
 Group:      Network & Connectivity/API
 License:    Apache-2.0
index 36d4ba7..678785b 100755 (executable)
@@ -715,7 +715,7 @@ EXPORT_API int stc_stats_rule_set_app_id(stc_stats_rule_h rule,
        if (app_id == NULL)
                stats_rule->app_id[0] = '\0'; //LCOV_EXCL_LINE
        else
-               g_strlcpy(stats_rule->app_id, app_id, strlen(app_id) + 1);
+               g_strlcpy(stats_rule->app_id, app_id, STC_APP_ID_LEN);
 
        STC_LOGI("App id [%s]", stats_rule->app_id);