cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=26253f6de454f2c77581e9e6221374895414c105
commit 26253f6de454f2c77581e9e6221374895414c105 Author: Romain Perier <romain.per...@openwide.fr> Date: Fri Jan 30 10:49:56 2015 +0100 ecore_win32: don't allocate Ecore_Event_Key events with NULL keys If "keyname" and "key" are NULL an Ecore_Event_Key is allocated throught calloc. strlen() is called on these variables, which crashes the program. As it is not correct to return a key event for NULL keys to ecore, it is preferrable to return NULL and exit the function before the key event is allocated, which fixes the crash in the same time. @fix Signed-off-by: Cedric BAIL <ced...@osg.samsung.com> --- src/lib/ecore_win32/ecore_win32_event.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/ecore_win32/ecore_win32_event.c b/src/lib/ecore_win32/ecore_win32_event.c index 2e1de2a..f9d29a1 100644 --- a/src/lib/ecore_win32/ecore_win32_event.c +++ b/src/lib/ecore_win32/ecore_win32_event.c @@ -1334,6 +1334,9 @@ _ecore_win32_event_keystroke_get(Ecore_Win32_Callback_Data *msg, } } + if (!keyname || !key) + return NULL; + e = (Ecore_Event_Key *)calloc(1, sizeof(Ecore_Event_Key) + strlen(keyname) + 1 + strlen(key) + 1 + --