summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhigang Gong <zhigang.gong@linux.intel.com>2012-01-04 07:01:19 +0000
committerJeremy Huddleston <jeremyhu@apple.com>2012-01-18 10:53:31 -0800
commitdea9377a257a402b2c7fe4a96c958d951a7d4579 (patch)
tree0528a52f4138d3915f5fb16a239ac2394f040477
parentd2db5100b1bafeeea8c1febd390631c8f8abb094 (diff)
mi/mibitblt: Fix an overflow bug of bit shift.
When depth equal to 32 and planeMask equal to 0, the overflow will occur and cause the pixmap can't be cleared. There are some test cases in XTS hit this bug, and this fix can eliminate the corresponding failures. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit f4956faab9ccf9aba6cf9603f4489f5dad19a347)
-rw-r--r--mi/mibitblt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mi/mibitblt.c b/mi/mibitblt.c
index 49e17bde6..6e0055758 100644
--- a/mi/mibitblt.c
+++ b/mi/mibitblt.c
@@ -648,7 +648,7 @@ miGetImage( DrawablePtr pDraw, int sx, int sy, int w, int h,
depth = pDraw->depth;
if(format == ZPixmap)
{
- if ( (((1<<depth)-1)&planeMask) != (1<<depth)-1 )
+ if ( (((1LL<<depth)-1)&planeMask) != (1LL<<depth)-1 )
{
ChangeGCVal gcv;
xPoint pt;