summaryrefslogtreecommitdiff
path: root/src/lib/eio/eio_monitor_win32.c
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 /src/lib/eio/eio_monitor_win32.c
parentbbba9198dbd35dfa67f8a42fe2d16f144abb7181 (diff)
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
Diffstat (limited to '')
-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)
85 if (!wname) 85 if (!wname)
86 return 0; 86 return 0;
87 87
88 if (fni->FileName[0] == 0)
89 return ECORE_CALLBACK_CANCEL;
90
88 memcpy(wname, fni->FileName, fni->FileNameLength); 91 memcpy(wname, fni->FileName, fni->FileNameLength);
89 wname[fni->FileNameLength / sizeof(wchar_t)] = 0; 92 wname[fni->FileNameLength / sizeof(wchar_t)] = 0;
90 name = evil_wchar_to_char(wname); 93 name = evil_wchar_to_char(wname);