diff options
Diffstat (limited to 'cfb')
-rw-r--r-- | cfb/cfbpixmap.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cfb/cfbpixmap.c b/cfb/cfbpixmap.c index f7e06bd13..704ab4eda 100644 --- a/cfb/cfbpixmap.c +++ b/cfb/cfbpixmap.c @@ -72,10 +72,13 @@ cfbCreatePixmap (pScreen, width, height, depth) int depth; { PixmapPtr pPixmap; - int datasize; - int paddedWidth; + size_t datasize; + size_t paddedWidth; paddedWidth = PixmapBytePad(width, depth); + + if (paddedWidth / 4 > 32767 || height > 32767) + return NullPixmap; datasize = height * paddedWidth; pPixmap = AllocatePixmap(pScreen, datasize); if (!pPixmap) |