use snprintf instead of strcpy 88/49488/2 accepted/tizen/tv/20151014.093648 submit/tizen/20151014.084340
authorJehun Lim <jehun.lim@samsung.com>
Wed, 14 Oct 2015 01:48:38 +0000 (10:48 +0900)
committerJehun Lim <jehun.lim@samsung.com>
Wed, 14 Oct 2015 02:19:02 +0000 (11:19 +0900)
(prevent: 486267, 486268, 486269, 486279, 486280, 486281)

Change-Id: I52736d3a43543fba5956a92e447805b97035f1fd
Signed-off-by: Jehun Lim <jehun.lim@samsung.com>
src/data/mediadata.c
src/grid/grid_gallery.c
src/view/detail.c

index 3f68f37..524da10 100644 (file)
@@ -259,7 +259,7 @@ static void _get_place_string(const char *src, char **city, char **country)
                return;
        }
 
-       strcpy(str, src);
+       snprintf(str, sizeof(str), "%s", src);
 
        p = strtok_r(str, "/", &tmp);
        if (!p)
index eb39a7b..8ea9d6d 100644 (file)
@@ -129,7 +129,7 @@ static char *_place_text_get(void *data, Evas_Object *obj, const char *part)
                snprintf(buf, sizeof(buf), "%d", cnt);
                return strdup(buf);
        } else {
-               strcpy(buf, gi->name);
+               snprintf(buf, sizeof(buf), "%s", gi->name);
 
                city = strtok_r(buf, "/", &tmp);
                country = strtok_r(tmp, "", &tmp);
index 59d77a5..851450f 100644 (file)
@@ -618,7 +618,7 @@ static void _get_place_title(const char *title, char *str, int size)
        char buf[64], s[64];
        char *city, *country, *tmp;
 
-       strcpy(buf, title);
+       snprintf(buf, sizeof(buf), "%s", title);
 
        city = strtok_r(buf, "/", &tmp);
        country = strtok_r(tmp, "", &tmp);