mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 09:20:02 +01:00
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 f4956faab9)
This commit is contained in:
parent
d2db5100b1
commit
dea9377a25
1 changed files with 1 additions and 1 deletions
|
|
@ -648,7 +648,7 @@ miGetImage( DrawablePtr pDraw, int sx, int sy, int w, int h,
|
||||||
depth = pDraw->depth;
|
depth = pDraw->depth;
|
||||||
if(format == ZPixmap)
|
if(format == ZPixmap)
|
||||||
{
|
{
|
||||||
if ( (((1<<depth)-1)&planeMask) != (1<<depth)-1 )
|
if ( (((1LL<<depth)-1)&planeMask) != (1LL<<depth)-1 )
|
||||||
{
|
{
|
||||||
ChangeGCVal gcv;
|
ChangeGCVal gcv;
|
||||||
xPoint pt;
|
xPoint pt;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue