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:
86ea8f9
)
efl_io_model: fix not to cause memory overflow by strcpy
86/199986/2
author
Jaehyun Cho
<jae_hyun.cho@samsung.com>
Mon, 18 Feb 2019 04:48:39 +0000
(13:48 +0900)
committer
Jaehyun Cho
<jae_hyun.cho@samsung.com>
Mon, 18 Feb 2019 06:18:24 +0000
(06:18 +0000)
Since the destination string size is EINA_PATH_MAX, the string is copied
up to EINA_PATH_MAX size.
Change-Id: Ibc0c9b830af3b0befd648cea3dd3288212358ec1
src/lib/eio/efl_io_model.c
patch
|
blob
|
history
diff --git
a/src/lib/eio/efl_io_model.c
b/src/lib/eio/efl_io_model.c
index
a142090
..
76cc7ab
100644
(file)
--- 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;
- str
cpy(info.path, mi->path
);
+ str
ncpy(info.path, mi->path, (EINA_PATH_MAX - 1)
);
if (!pd->filter.cb(pd->filter.data, obj, &info))
{