summaryrefslogtreecommitdiff
path: root/src/lib/ecore
diff options
context:
space:
mode:
authorShinwoo Kim <cinoo.kim@samsung.com>2018-09-04 11:54:17 +0100
committerAlastair Poole <netstar@gmail.com>2018-09-04 11:54:17 +0100
commitad97989b28dff5744fdbe66943fa20789a5c2d2a (patch)
tree3eddb1c248d8c9a18d4710ded15acde77ffdaa2d /src/lib/ecore
parentfd87dbce3870bded4b99d8e3c2b118f57901bff4 (diff)
ecore_event: initialize uninitialized variable
Summary: The following commit (1) made an abort (2) (1) commit d1e4c6bab84e55837a70b8883a28e7eb6d49db09 Author: Jean Guyomarc'h <jean@guyomarch.bzh> Date: Mon Aug 27 12:04:35 2018 +0900 ecore: fix built-in event types generation (2) abort /lib/x86_64-linux-gnu/libc.so.6(+0x777e5) /lib/x86_64-linux-gnu/libc.so.6(+0x8037a) /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c) /home/kimcinoo/install/lib/libecore.so.1(+0x237d7) /home/kimcinoo/install/lib/libeo.so.1(efl_destructor+0x64) /home/kimcinoo/install/lib/libeo.so.1(+0x18029) /home/kimcinoo/install/lib/libeo.so.1(efl_unref+0x44c) /home/kimcinoo/install/lib/libecore.so.1(+0x201f2) /home/kimcinoo/install/lib/libecore.so.1(ecore_shutdown+0x145) /home/kimcinoo/Upstream/efl/src/tests/ecore/.libs/lt-efl_app_suite(+0xb85d) /home/kimcinoo/install/lib/libcheck.so.0(srunner_run_tagged+0xa13) /home/kimcinoo/Upstream/efl/src/tests/ecore/.libs/lt-efl_app_suite(+0xead9) /home/kimcinoo/Upstream/efl/src/tests/ecore/.libs/lt-efl_app_suite(+0x4ade) /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) /home/kimcinoo/Upstream/efl/src/tests/ecore/.libs/lt-efl_app_suite And following commit (3) fixed the abort. (3) commit 3f306491a32a1880bccfe64861b5fec2ba09049b Author: Yeongjong Lee <cleanlyj@naver.com> Date: Mon Sep 3 15:55:13 2018 +0000 ecore_event: fix ecore event handler iterator range The above commit fixed the abort though, we could access uninitialized memory and make another abort again. This would prevent such unwanted case. Reviewers: Hermet, YOhoho, bu5hm4n, netstar Reviewed By: netstar Subscribers: netstar, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6970
Diffstat (limited to 'src/lib/ecore')
-rw-r--r--src/lib/ecore/ecore_event_message_handler.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/ecore/ecore_event_message_handler.c b/src/lib/ecore/ecore_event_message_handler.c
index 6df1227cf0..60ab2c9395 100644
--- a/src/lib/ecore/ecore_event_message_handler.c
+++ b/src/lib/ecore/ecore_event_message_handler.c
@@ -134,6 +134,7 @@ _ecore_event_message_handler_type_new(Eo *obj EINA_UNUSED, Ecore_Event_Message_H
134 tmp = realloc(pd->handlers, sizeof(Eina_Inlist *) * (evnum + 1)); 134 tmp = realloc(pd->handlers, sizeof(Eina_Inlist *) * (evnum + 1));
135 if (!tmp) return 0; 135 if (!tmp) return 0;
136 pd->handlers = tmp; 136 pd->handlers = tmp;
137 pd->handlers[ECORE_EVENT_NONE] = NULL;
137 pd->handlers[evnum] = NULL; 138 pd->handlers[evnum] = NULL;
138 pd->event_type_count = evnum; 139 pd->event_type_count = evnum;
139 return evnum; 140 return evnum;