Fix buffer_overflow issue detected by svace 2.5 (WGID: 308944) 41/170241/2 accepted/tizen/unified/20180221.061134 submit/tizen/20180220.082110
authorSaulo Moraes <s.moraes@samsung.com>
Wed, 14 Feb 2018 16:56:55 +0000 (14:56 -0200)
committerKyoungyong Lee <k.y.lee@samsung.com>
Tue, 20 Feb 2018 04:31:14 +0000 (04:31 +0000)
Change-Id: I53ceb0a9d3de059b43c38d6bf7e0afd2db413d83

ui/src/privacy_dlp_reports_data_stat_view.c

index 2e5a45685a436edc8e8d312ec4634b8ef8ec991b..9430b14adbdeaad874fd79dea07f442eb2ce75ea 100644 (file)
@@ -46,6 +46,7 @@ static bool _pg_dlp_leak_logs_cb(const char *category, time_t first_time_stamp,
 
        if (data != NULL) {
                strncpy(data->category.text, category, LEN_CATEGORY);
+               data->category.text[LEN_CATEGORY - 1] = '\0';
                data->first_time_stamp = first_time_stamp;
                data->last_time_stamp = last_time_stamp;
                data->leak_count = leak_count;