summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichelle legrand <michelle.legrand@openwide.fr>2015-02-03 13:25:58 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-02-11 17:03:37 +0100
commita9035c1cf5852be7bdd36edaa9dc3bfd64c44dd0 (patch)
treeb0da9b11e368821d4aa15f3c14f4efd5ea34563a
parentbbba9198dbd35dfa67f8a42fe2d16f144abb7181 (diff)
downloadefl-a9035c1cf5852be7bdd36edaa9dc3bfd64c44dd0.tar.gz
eio: check that the file to be monitored is not an empty string.
This fix segmentation faults on Windows caused by eio_monitor events. @fix
-rw-r--r--src/lib/eio/eio_monitor_win32.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/eio/eio_monitor_win32.c b/src/lib/eio/eio_monitor_win32.c
index 12e87cae0f..d092802e9f 100644
--- a/src/lib/eio/eio_monitor_win32.c
+++ b/src/lib/eio/eio_monitor_win32.c
@@ -85,6 +85,9 @@ _eio_monitor_win32_cb(void *data, Ecore_Win32_Handler *wh EINA_UNUSED)
if (!wname)
return 0;
+ if (fni->FileName[0] == 0)
+ return ECORE_CALLBACK_CANCEL;
+
memcpy(wname, fni->FileName, fni->FileNameLength);
wname[fni->FileNameLength / sizeof(wchar_t)] = 0;
name = evil_wchar_to_char(wname);