From c8cee32929a3c03fca65a4532d1c627cd48e33f2 Mon Sep 17 00:00:00 2001 From: Jaehyun Cho Date: Mon, 18 Feb 2019 13:48:39 +0900 Subject: [PATCH] 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. --- src/lib/eio/efl_io_model.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/eio/efl_io_model.c b/src/lib/eio/efl_io_model.c index a14209069a..76cc7ab40c 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) info.name_start = mi->name_start; info.name_length = mi->name_length; info.type = EINA_FILE_UNKNOWN; - strcpy(info.path, mi->path); + strncpy(info.path, mi->path, (EINA_PATH_MAX - 1)); if (!pd->filter.cb(pd->filter.data, obj, &info)) {