[PATCH] Xi: fix not reached code in XSendExtensionEvent
Dan Nicholson
dbn.lists at gmail.com
Sat Apr 17 08:15:10 PDT 2010
On Fri, Apr 16, 2010 at 7:24 AM, Tiago Vignatti
<tiago.vignatti at nokia.com> wrote:
> Error was introduced in 31a7994a.
>
> Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
> ---
> Xi/sendexev.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/Xi/sendexev.c b/Xi/sendexev.c
> index 8629dd2..bd96d74 100644
> --- a/Xi/sendexev.c
> +++ b/Xi/sendexev.c
> @@ -138,9 +138,10 @@ ProcXSendExtensionEvent(ClientPtr client)
>
> first = ((xEvent *) & stuff[1]);
> if (!((EXTENSION_EVENT_BASE <= first->u.u.type) &&
> - (first->u.u.type < lastEvent)))
> + (first->u.u.type < lastEvent))) {
> client->errorValue = first->u.u.type;
> return BadValue;
> + }
>
> list = (XEventClass *) (first + stuff->num_events);
> if ((ret = CreateMaskFromList(client, list, stuff->count, tmp, dev,
> --
> 1.6.0.4
Wow, I guess this was always returning BadValue? Has this been broken
since 2007? I guess nobody uses XSendExtensionEvent.
Reviewed-by: Dan Nicholson <dbn.lists at gmail.com>
More information about the xorg-devel
mailing list