projects
/
platform
/
upstream
/
efl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e51e236
)
evas vg: use strncpy() instead of strcpy() for better security.
07/200007/2
author
Hermet Park
<hermetpark@gmail.com>
Mon, 18 Feb 2019 05:47:14 +0000
(14:47 +0900)
committer
Hermet Park
<chuneon.park@samsung.com>
Mon, 18 Feb 2019 06:40:04 +0000
(06:40 +0000)
Change-Id: I950e52cd82ea92a644be4237a0f0724dafa3f504
src/lib/evas/vg/evas_vg_cache.c
patch
|
blob
|
history
diff --git
a/src/lib/evas/vg/evas_vg_cache.c
b/src/lib/evas/vg/evas_vg_cache.c
index
652f9eb
..
262127a
100644
(file)
--- a/
src/lib/evas/vg/evas_vg_cache.c
+++ b/
src/lib/evas/vg/evas_vg_cache.c
@@
-191,8
+191,9
@@
_vg_file_save(Vg_File_Data *vfd, const char *file, const char *key, const char *
char *p, *pp;
char *tflags;
- tflags = alloca(strlen(flags) + 1);
- strcpy(tflags, flags);
+ int len = strlen(flags);
+ tflags = alloca(len) + 1;
+ strncpy(tflags, flags, len);
p = tflags;
while (p)
{