[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 19:00:45 PDT 2011

On Tue, 2011-09-13 at 19:31 +0800, Sam Spilsbury wrote:
> 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.

Alright, new patch attached.

> Anyways, patch attached,
> Thanks,
> Sam
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel

More information about the xorg-devel mailing list