diff options
author | Pauli Nieminen <ext-pauli.nieminen@nokia.com> | 2011-01-03 12:25:28 -0500 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2016-10-19 21:40:24 +0200 |
commit | 1a72bc41460aa37b2ae6ce37bc9fb9e3644f5943 (patch) | |
tree | 4122ebe4f44a59f22fb53dda2ce353e6ec132f5f /nx-X11/lib/X11/XlibInt.c | |
parent | 8ff526111bfc6ca8d2384c4d4962b8e8ff3621f9 (diff) | |
download | nx-libs-1a72bc41460aa37b2ae6ce37bc9fb9e3644f5943.tar.gz nx-libs-1a72bc41460aa37b2ae6ce37bc9fb9e3644f5943.tar.bz2 nx-libs-1a72bc41460aa37b2ae6ce37bc9fb9e3644f5943.zip |
Initialize event type
If we receive unsupported event closing connection triggers valgrind
error.
==12017== Conditional jump or move depends on uninitialised value(s)
==12017== at 0x487D454: _XFreeDisplayStructure (OpenDis.c:607)
==12017== by 0x486857B: XCloseDisplay (ClDisplay.c:72)
*snip*
==12017== Uninitialised value was created by a heap allocation
==12017== at 0x4834C48: malloc (vg_replace_malloc.c:236)
==12017== by 0x4894147: _XEnq (XlibInt.c:877)
==12017== by 0x4891BF3: handle_response (xcb_io.c:335)
==12017== by 0x4892263: _XReply (xcb_io.c:626)
*snip*
Problem is that XFreeDisplaySturture is checking for qelt->event.type ==
GenericEvent while _XUnknownWireEvent doesn't store the type.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11/lib/X11/XlibInt.c')
-rw-r--r-- | nx-X11/lib/X11/XlibInt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nx-X11/lib/X11/XlibInt.c b/nx-X11/lib/X11/XlibInt.c index 7ca1d0d01..e4078ca31 100644 --- a/nx-X11/lib/X11/XlibInt.c +++ b/nx-X11/lib/X11/XlibInt.c @@ -2951,6 +2951,8 @@ void _XEnq( type = event->u.u.type & 0177; extension = ((xGenericEvent*)event)->extension; + + qelt->event.type = type; /* If an extension has registerd a generic_event_vec handler, then * it can handle event cookies. Otherwise, proceed with the normal * event handlers. |