X crash with xorg-server-1.5.3 and patch

Jason Kim jason at userful.com
Wed Mar 11 12:37:36 PDT 2009


I'm using xorg-server-1.5.3 (X11R7.4). I've experienced X crash several
times and found that it was a null pointer dereference problem.  

Following is the patch I made. Please apply this if it makes sense :P.
After I rebuild X with the patch, I haven't had X crash any more. 


--- ./xorg-server-1.5.3/render/glyph.c.testing        2009-03-10
14:37:03.000000000 -0500
+++ ./xorg-server-1.5.3/render/glyph.c  2009-03-11 15:42:02.000000000
-0500
@@ -150,6 +150,9 @@
              Bool              match,
              unsigned char     sha1[20])
 {
+    if (!hash->hashSet) 
+       return NULL;
+
     CARD32     elt, step, s;
     GlyphPtr   glyph;
     GlyphRefPtr        table, gr, del;
@@ -232,6 +235,8 @@

     gr = FindGlyphRef (&globalGlyphs[format],
                       signature, TRUE, sha1);
+    if (!gr)
+       return NULL;

     if (gr->glyph && gr->glyph != DeletedGlyph)
        return gr->glyph;
 

-- 
**********************************
Jason Kim, Software Developer
http://userful.com
709 11 AVE SW
Calgary AB T2R 0E3
Tel: 403-289-2177   EXT: 210
     866-USERFUL (873-7385)
Fax: 403-206-7010




More information about the xorg mailing list