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:
parent
6d6d4cb604
commit
f4956faab9
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user