[PATCH:xscope] Bug 66388 wrong output for filter names in RandR GetCrtcTransform reply

Matt Dew marcoz at osource.org
Tue Jul 16 10:57:04 PDT 2013


If not too late,


Reviewed-By: Matt Dew <marcoz at osource.org>



On 06/29/2013 05:37 PM, Alan Coopersmith wrote:
> https://bugs.freedesktop.org/show_bug.cgi?id=66388
>
> Had missed a 4 byte padding field between the transform data and
> the start of the filter name fields.
>
> The offset to the strings now matches the 96 bytes specified for
> sz_xRRGetCrtcTransformReply in <X11/extensions/randrproto.h> and
> the test case now reports:
>                           pending filter name: "bilinear"
> instead of:
>                           current filter name: "^@^@^@^@bili"
>
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---
>   print_randr.c |   19 ++++++++++---------
>   1 file changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/print_randr.c b/print_randr.c
> index 3182664..5eb3e63 100644
> --- a/print_randr.c
> +++ b/print_randr.c
> @@ -1116,18 +1116,19 @@ RandrGetCrtcTransformReply(FD fd, const unsigned char *buf)
>       PrintField(buf, 44, 1, BOOL, "has transforms");
>       /* 3 bytes unused */
>       PrintField(buf, 48, 36, RENDERTRANSFORM, "current transform");
> +    /* 4 bytes unused */
>
> -    printfield(buf, 84, 2, CARD16, "pending filter name length"); /* pn */
> -    printfield(buf, 86, 2, CARD16, "pending filter num params");  /* pf */
> -    printfield(buf, 88, 2, CARD16, "current filter name length"); /* cn */
> -    printfield(buf, 90, 2, CARD16, "current filter num params");  /* cf */
> +    printfield(buf, 88, 2, CARD16, "pending filter name length"); /* pn */
> +    printfield(buf, 90, 2, CARD16, "pending filter num params");  /* pf */
> +    printfield(buf, 92, 2, CARD16, "current filter name length"); /* cn */
> +    printfield(buf, 94, 2, CARD16, "current filter num params");  /* cf */
>
> -    pn = IShort(&buf[84]);
> -    pf = IShort(&buf[86]);
> -    cn = IShort(&buf[88]);
> -    cf = IShort(&buf[90]);
> +    pn = IShort(&buf[88]);
> +    pf = IShort(&buf[90]);
> +    cn = IShort(&buf[92]);
> +    cf = IShort(&buf[94]);
>
> -    buf += 92;
> +    buf += 96;
>
>       PrintString8(buf, pn, "pending filter name");
>       buf += pad(pn);
>


More information about the xorg-devel mailing list