Replace vulnerable function 'strcpy' to 'strncpy' 08/61408/2
authorMun, Gwan-gyeong <kk.moon@samsung.com>
Mon, 7 Mar 2016 12:55:07 +0000 (21:55 +0900)
committerMun, Gwan-gyeong <kk.moon@samsung.com>
Tue, 8 Mar 2016 01:37:35 +0000 (10:37 +0900)
Change-Id: I120694b6c0c1ed0dbfc58f76ea2811d4517b0cdb

src/modules/tracepath/coregl_tracepath.c

index 7d9d7c4..511ae38 100644 (file)
@@ -595,7 +595,7 @@ _get_trace_data(Trace_Data **ftd_table, size_t td_size, const char *name)
        } else {
                Trace_Data *newitm = NULL;
                newitm = (Trace_Data *)calloc(1, td_size);
-               strcpy(newitm->name, name);
+               strncpy(newitm->name, name, strlen(newitm->name));
                newitm->next = NULL;
 
                if (prev != NULL) {