[Xcb-commit] event

Peter Harris peterh at kemper.freedesktop.org
Fri May 15 12:16:22 PDT 2009


 event/event.c |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit b53c9c951dfd85f4b79683172213a7ac36ff81fe
Author: Mikhail Gusarov <dottedmag at dottedmag.net>
Date:   Sat May 16 02:08:46 2009 +0700

    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 at dottedmag.net>
    Signed-off-by: Peter Harris <pharris at opentext.com>

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;
 }
 


More information about the xcb-commit mailing list