Patch (ref bug #27572)
telford at lnx-bsp.net
telford at lnx-bsp.net
Sat Apr 10 02:16:40 PDT 2010
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.
-------------- next part --------------
From 1f20e3b0d130319af0af839ee7c048024b1b5d8c Mon Sep 17 00:00:00 2001
From: root <root at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100410/19a9a6e9/attachment.pgp>
More information about the xorg-devel
mailing list