[PATCH libXRes] Compute number of bytes correctly in XResQueryClientPixmapBytes
Alan Coopersmith
alan.coopersmith at oracle.com
Sat Jul 6 11:29:52 PDT 2013
On 06/30/13 11:09 AM, Julien Cristau wrote:
> 64-bit servers send the upper 32-bit in bytes_overflow. We were
> multiplying by 2^32 - 1 instead of 2^32 when putting things back
> together.
>
> Debian bug#621702
>
> Reported-by: Kevin Ryde <user42 at zip.com.au>
> Signed-off-by: Julien Cristau <jcristau at debian.org>
> ---
> src/XRes.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/XRes.c b/src/XRes.c
> index 51e905f..89fab82 100644
> --- a/src/XRes.c
> +++ b/src/XRes.c
> @@ -240,7 +240,7 @@ Status XResQueryClientPixmapBytes (
> }
>
> #ifdef LONG64
> - *bytes = (rep.bytes_overflow * 4294967295) + rep.bytes;
> + *bytes = (rep.bytes_overflow * 4294967296UL) + rep.bytes;
> #else
> *bytes = rep.bytes_overflow ? 0xffffffff : rep.bytes;
> #endif
>
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Engineering - http://blogs.oracle.com/alanc
More information about the xorg-devel
mailing list