englebass pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=752d627a93b56d8ffe640a30167a7cfb3d61bf91
commit 752d627a93b56d8ffe640a30167a7cfb3d61bf91 Author: Sebastian Dransfeld <[email protected]> Date: Sat Dec 7 18:32:17 2013 +0100 ecore_x: Fix buffer overrun Use strncpy to prevent buffer overrun on buf, and '\0' terminate. Fixes CID 1039584 --- src/lib/ecore_file/ecore_file_monitor_inotify.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore_file/ecore_file_monitor_inotify.c b/src/lib/ecore_file/ecore_file_monitor_inotify.c index bd78f92..e21e41c 100644 --- a/src/lib/ecore_file/ecore_file_monitor_inotify.c +++ b/src/lib/ecore_file/ecore_file_monitor_inotify.c @@ -199,7 +199,10 @@ _ecore_file_monitor_inotify_events(Ecore_File_Monitor *em, char *file, int mask) if ((file) && (file[0])) snprintf(buf, sizeof(buf), "%s/%s", em->path, file); else - strcpy(buf, em->path); + { + strncpy(buf, em->path, sizeof(buf)); + buf[PATH_MAX - 1] = 0; + } isdir = mask & IN_ISDIR; #if 0 --
