summaryrefslogtreecommitdiff
path: root/src/lib/evas/vg/evas_vg_cache.c
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-02-18 14:47:14 +0900
committerHermet Park <hermetpark@gmail.com>2019-02-21 10:36:49 +0900
commita8d5f275c780692df8a63897601a0c05e48678ac (patch)
treeee9901c161152acb67f0768401393acc722382c1 /src/lib/evas/vg/evas_vg_cache.c
parent3967e1f3543435cb95e0208330845c6b7995d876 (diff)
evas vg: use strncpy() instead of strcpy() for better security.
Diffstat (limited to 'src/lib/evas/vg/evas_vg_cache.c')
-rw-r--r--src/lib/evas/vg/evas_vg_cache.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/evas/vg/evas_vg_cache.c b/src/lib/evas/vg/evas_vg_cache.c
index ec5fc6b0be..9833ef65ae 100644
--- a/src/lib/evas/vg/evas_vg_cache.c
+++ b/src/lib/evas/vg/evas_vg_cache.c
@@ -181,8 +181,9 @@ _vg_file_save(Vg_File_Data *vfd, const char *file, const char *key, const char *
181 char *p, *pp; 181 char *p, *pp;
182 char *tflags; 182 char *tflags;
183 183
184 tflags = alloca(strlen(flags) + 1); 184 int len = strlen(flags);
185 strcpy(tflags, flags); 185 tflags = alloca(len) + 1;
186 strncpy(tflags, flags, len);
186 p = tflags; 187 p = tflags;
187 while (p) 188 while (p)
188 { 189 {