[PATCH] Fix handling of SendEvent requests which set the SendEvent bit before sending the event down the wire

Sam Spilsbury sam.spilsbury at canonical.com
Tue Sep 13 04:31:12 PDT 2011


Hi,

I haven't contributed any patches to X11 before so excuse me if I'm
terribly in the wrong.

I noticed that the server is not removing the SendEvent (0x80) bit in
ProcSendEvent in dix/events.c before doing range checks on the event
type. This would cause these range checks to return an invalid BadValue
error.

I am not sure if this is *really* a bug in the server or a bug in
extension libraries (like libXext) who set the SendEvent bit before
converting the event to wire format, since ProcSendEvent sets the
SendEvent bit anyways just before it writes the event to the client.

This at least fixed a case for me where sending synthetic ShapeNotify
events to clients resulted in a BadValue error.

Anyways, patch attached,

Thanks,

Sam


More information about the xorg-devel mailing list