[PATCH] xfixes: CreatePointerBarrier has a variable request length

Jasper St. Pierre jstpierre at mecheye.net
Fri Nov 2 07:58:09 PDT 2012


On Fri, Nov 2, 2012 at 2:40 AM, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> The protocol allows the use of device IDs after the request. We return
> BadImplementation anyway, but that's still better than BadLength for what
> is a valid request.
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
>  xfixes/cursor.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xfixes/cursor.c b/xfixes/cursor.c
> index 4eee592..1771946 100644
> --- a/xfixes/cursor.c
> +++ b/xfixes/cursor.c
> @@ -1279,7 +1279,7 @@ ProcXFixesCreatePointerBarrier(ClientPtr client)
>
>      REQUEST(xXFixesCreatePointerBarrierReq);
>
> -    REQUEST_SIZE_MATCH(xXFixesCreatePointerBarrierReq);
> +    REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq, pad_to_int32(stuff->num_devices));
>      LEGAL_NEW_RESOURCE(stuff->barrier, client);
>
>      err = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess);
> --
> 1.7.11.7

Shouldn't you need to do this for the SProc as well?

> _______________________________________________
> 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



-- 
  Jasper


More information about the xorg-devel mailing list