summaryrefslogtreecommitdiff
path: root/src/lib/eio
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2019-02-18 13:48:39 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2019-02-22 13:57:37 +0900
commitc8cee32929a3c03fca65a4532d1c627cd48e33f2 (patch)
tree03db692b2f215ff6fd23d7b95a25da9790e85f5a /src/lib/eio
parentf02b82a49e12c0d02bb3f438046e1ceb93d1643b (diff)
efl_io_model: fix not to cause memory overflow by strcpy
Since the destination string size is EINA_PATH_MAX, the string is copied up to EINA_PATH_MAX size.
Diffstat (limited to 'src/lib/eio')
-rw-r--r--src/lib/eio/efl_io_model.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/eio/efl_io_model.c b/src/lib/eio/efl_io_model.c
index a142090..76cc7ab 100644
--- a/src/lib/eio/efl_io_model.c
+++ b/src/lib/eio/efl_io_model.c
@@ -111,7 +111,7 @@ _efl_model_evt_added_ecore_cb(void *data, int type, void *event)
111 info.name_start = mi->name_start; 111 info.name_start = mi->name_start;
112 info.name_length = mi->name_length; 112 info.name_length = mi->name_length;
113 info.type = EINA_FILE_UNKNOWN; 113 info.type = EINA_FILE_UNKNOWN;
114 strcpy(info.path, mi->path); 114 strncpy(info.path, mi->path, (EINA_PATH_MAX - 1));
115 115
116 if (!pd->filter.cb(pd->filter.data, obj, &info)) 116 if (!pd->filter.cb(pd->filter.data, obj, &info))
117 { 117 {