From f99c5991a89dfd6b88370afff0d802f29aaffff7 Mon Sep 17 00:00:00 2001 From: Jehun Lim Date: Wed, 14 Oct 2015 10:48:38 +0900 Subject: use snprintf instead of strcpy (prevent: 486267, 486268, 486269, 486279, 486280, 486281) Change-Id: I52736d3a43543fba5956a92e447805b97035f1fd Signed-off-by: Jehun Lim --- src/data/mediadata.c | 2 +- src/grid/grid_gallery.c | 2 +- src/view/detail.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data/mediadata.c b/src/data/mediadata.c index 3f68f37..524da10 100644 --- a/src/data/mediadata.c +++ b/src/data/mediadata.c @@ -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) diff --git a/src/grid/grid_gallery.c b/src/grid/grid_gallery.c index eb39a7b..8ea9d6d 100644 --- a/src/grid/grid_gallery.c +++ b/src/grid/grid_gallery.c @@ -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); diff --git a/src/view/detail.c b/src/view/detail.c index 59d77a5..851450f 100644 --- a/src/view/detail.c +++ b/src/view/detail.c @@ -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); -- cgit v1.2.3