diff options
author | Mikhail Gusarov <dottedmag@dottedmag.net> | 2009-05-16 02:08:46 +0700 |
---|---|---|
committer | Peter Harris <pharris@opentext.com> | 2009-05-15 15:14:43 -0400 |
commit | b53c9c951dfd85f4b79683172213a7ac36ff81fe (patch) | |
tree | c413add3758d356f828abae8b4cf6bd10404da4a | |
parent | 85c7984f110dabb23ebaef367bcf6df96ad34377 (diff) |
Zero out handlers list in xcb_event_handlers_init
xcb_event_handle relies on the fact that handler for non-handled
event is NULL. Initialize handlers in xcb_event_handlers_init
to avoid calling function by uninitialized pointer.
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Signed-off-by: Peter Harris <pharris@opentext.com>
-rw-r--r-- | event/event.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/event/event.c b/event/event.c index ce83d6e..1332a33 100644 --- a/event/event.c +++ b/event/event.c @@ -35,6 +35,7 @@ void xcb_event_handlers_init(xcb_connection_t *c, xcb_event_handlers_t *evenths) { + memset(evenths, 0, sizeof(xcb_event_handlers_t)); evenths->c = c; } |