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.
This commit is contained in:
Jaehyun Cho 2019-02-18 13:48:39 +09:00
parent f02b82a49e
commit c8cee32929
1 changed files with 1 additions and 1 deletions

View File

@ -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))
{