forked from enlightenment/efl
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:
parent
f02b82a49e
commit
c8cee32929
|
@ -111,7 +111,7 @@ _efl_model_evt_added_ecore_cb(void *data, int type, void *event)
|
||||||
info.name_start = mi->name_start;
|
info.name_start = mi->name_start;
|
||||||
info.name_length = mi->name_length;
|
info.name_length = mi->name_length;
|
||||||
info.type = EINA_FILE_UNKNOWN;
|
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))
|
if (!pd->filter.cb(pd->filter.data, obj, &info))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue