summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Cristau <jcristau@debian.org>2013-06-30 20:09:49 +0200
committerJulien Cristau <jcristau@debian.org>2013-07-07 00:05:44 +0200
commit0f5cfdc3136dd8ef43800bda64f9d39e6b23b2e9 (patch)
tree38c05b4cdd90e65b2889909f796d8d5c75e3cd08
parentf468184963e53feda848853c4aefd0197b2cc116 (diff)
downloadxorg-lib-libXRes-0f5cfdc3136dd8ef43800bda64f9d39e6b23b2e9.tar.gz
Compute number of bytes correctly in XResQueryClientPixmapBytes
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@zip.com.au> Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/XRes.c2
1 files changed, 1 insertions, 1 deletions
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