Fix overly-restrictive integer overflow check in EXA pixmap creation.

The result was that at 32bpp, pixmaps of width 8192 or greater couldn't be
created, due to treating a pitch value as a width.
(cherry picked from commit bc2d516f16)
This commit is contained in:
Eric Anholt 2007-08-17 12:14:16 -07:00 committed by Daniel Stone
parent 2621380cf6
commit 458b487723

View File

@ -253,7 +253,7 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth)
pExaScr->info->pixmapPitchAlign);
pExaPixmap->fb_size = pExaPixmap->fb_pitch * h;
if (pExaPixmap->fb_pitch > 32767) {
if (pExaPixmap->fb_pitch > 131071) {
fbDestroyPixmap(pPixmap);
return NULL;
}