[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg-devel
Subject: [PATCH 3/3] fb: Don't crash if copy_drawable() returns NULL.
From: michel () daenzer ! net (=?UTF-8?q?Michel=20D=C3=A4nzer?=)
Date: 2009-11-30 12:17:53
Message-ID: 1259583473-12609-4-git-send-email-michel () daenzer ! net
[Download RAW message or body]
From: Michel D?nzer <daenzer at vmware.com>
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=24634 .
Signed-off-by: Michel D?nzer <daenzer at vmware.com>
---
fb/fbpict.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/fb/fbpict.c b/fb/fbpict.c
index 2fbef15..7ae3ec5 100644
--- a/fb/fbpict.c
+++ b/fb/fbpict.c
@@ -329,9 +329,11 @@ create_bits_picture (PicturePtr pict,
pixman_image_t *image;
DrawablePtr drawable;
- if (is_src && pict->pDrawable->type == DRAWABLE_WINDOW)
+ if (is_src && pict->pDrawable->type == DRAWABLE_WINDOW) {
drawable = copy_drawable (pict->pDrawable);
- else
+ if (!drawable)
+ return NULL;
+ } else
drawable = pict->pDrawable;
fbGetDrawable (drawable, bits, stride, bpp, xoff, yoff);
--
1.6.5.3
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic