From d74a45ba8ab750af20c3b1493cc749f21aa93ebe Mon Sep 17 00:00:00 2001 From: Joel Bosveld Date: Fri, 17 Jul 2009 23:36:47 +0800 Subject: [PATCH] fb: don't create image with invalid address if pPix->devPrivate.ptr == NULL --- fb/fbpict.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/fb/fbpict.c b/fb/fbpict.c index 32052e9..2ef1826 100644 --- a/fb/fbpict.c +++ b/fb/fbpict.c @@ -335,6 +335,9 @@ create_bits_picture (PicturePtr pict, fbGetDrawable (drawable, bits, stride, bpp, xoff, yoff); + if (!bits) + return NULL; + bits = (FbBits*)((CARD8*)bits + drawable->y * stride * sizeof(FbBits) + drawable->x * (bpp / 8)); image = pixman_image_create_bits ( -- 1.6.0.3