From a9035c1cf5852be7bdd36edaa9dc3bfd64c44dd0 Mon Sep 17 00:00:00 2001 From: michelle legrand Date: Tue, 3 Feb 2015 13:25:58 +0100 Subject: [PATCH] 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 --- src/lib/eio/eio_monitor_win32.c | 3 +++ 1 file changed, 3 insertions(+) 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);