aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYeongjong Lee <cleanlyj@naver.com>2018-09-03 15:55:13 +0000
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-09-03 18:13:32 +0200
commit3f306491a32a1880bccfe64861b5fec2ba09049b (patch)
treeda77b97d3b5e5b2f215852aa6c456b9e9ea41d92
parentbuild: add keymapheader to dist tarbal (diff)
downloadefl-3f306491a32a1880bccfe64861b5fec2ba09049b.tar.gz
ecore_event: fix ecore event handler iterator range
event handler start at 1 (see _ecore_event_message_handler_type_new and _ecore_event_message_handler_efl_object_constructor) so that handlers[0] is not allocated. this patch avoid invalid memory access. this fixes https://phab.enlightenment.org/T7349 Differential Revision: https://phab.enlightenment.org/D6966
-rw-r--r--src/lib/ecore/ecore_event_message_handler.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ecore/ecore_event_message_handler.c b/src/lib/ecore/ecore_event_message_handler.c
index f5498832f9..6df1227cf0 100644
--- a/src/lib/ecore/ecore_event_message_handler.c
+++ b/src/lib/ecore/ecore_event_message_handler.c
@@ -314,7 +314,7 @@ _ecore_event_message_handler_efl_object_destructor(Eo *obj, Ecore_Event_Message_
{
free(h);
}
- for (i = 0; i <= pd->event_type_count; i++)
+ for (i = 1; i <= pd->event_type_count; i++)
{
EINA_INLIST_FREE(pd->handlers[i], h)
{