See attached, from git-format-patch
Hopefully prevent crash that can occur from dodgy glyph data
(depends on the video driver in use whether the bad pointer turns up).

Please review.
From 1f20e3b0d130319af0af839ee7c048024b1b5d8c Mon Sep 17 00:00:00 2001
From: root <r...@eeepc.(none)>
Date: Sat, 10 Apr 2010 09:45:12 +0000
Subject: [PATCH] Prevent crash when NULL pointer comes back from video driver

---
 render/render.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/render/render.c b/render/render.c
index a32d797..93bb9ef 100644
--- a/render/render.c
+++ b/render/render.c
@@ -1159,6 +1159,12 @@ ProcRenderAddGlyphs (ClientPtr client)
                                                   width, height, depth,
                                                   
CREATE_PIXMAP_USAGE_GLYPH_PICTURE);
 
+               if (! pDstPix) /* Usually implies display driver rejected 
width, height, depth, etc... */
+               {
+                   err = BadValue;
+                   goto bail;
+               }
+
                GlyphPicture (glyph)[screen] = pDst =
                        CreatePicture (0, &pDstPix->drawable,
                                       glyphSet->format,
-- 
1.6.0.4

Attachment: pgpDqbHborEDN.pgp
Description: PGP signature

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to