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
This commit is contained in:
michelle legrand 2015-02-03 13:25:58 +01:00 committed by Cedric BAIL
parent bbba9198db
commit a9035c1cf5
1 changed files with 3 additions and 0 deletions

View File

@ -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);