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>
This commit is contained in:
Zhigang Gong 2012-01-04 07:01:19 +00:00 committed by Keith Packard
parent 6d6d4cb604
commit f4956faab9

View File

@ -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;