summaryrefslogtreecommitdiff
path: root/mi
diff options
context:
space:
mode:
authorZhigang Gong <zhigang.gong@linux.intel.com>2012-01-04 07:01:19 +0000
committerKeith Packard <keithp@keithp.com>2012-01-09 13:09:49 -0800
commitf4956faab9ccf9aba6cf9603f4489f5dad19a347 (patch)
tree47d46c27f2d307acb83d906f53a6dd7221d9d8ae /mi
parent6d6d4cb6043905d850834946e9bfc526ed5a9ef7 (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>
Diffstat (limited to 'mi')
-rw-r--r--mi/mibitblt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mi/mibitblt.c b/mi/mibitblt.c
index 2dfff1451..fc6eb8d6e 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;