[Openchrome-devel] Fix NULL dereference in viaExaCheckComposite()

Daniel Drake dsd
Wed Jun 24 03:24:08 PDT 2009

When EXA is enabled, X crashes when I start sugar because of a NULL pointer

All of the other checks in this function first check that pMaskPicture is
non-NULL, but this one was left out.

Index: xf86-video-openchrome-0.2.903/src/via_accel.c
--- xf86-video-openchrome-0.2.903.orig/src/via_accel.c
+++ xf86-video-openchrome-0.2.903/src/via_accel.c
@@ -2069,7 +2069,7 @@ viaExaCheckComposite(int op, PicturePtr 
         pMaskPicture->pDrawable->height < VIA_MIN_COMPOSITE)
         return FALSE;
-    if (pMaskPicture->repeat != RepeatNormal)
+    if (pMaskPicture && pMaskPicture->repeat != RepeatNormal)
         return FALSE;
     if (pMaskPicture && pMaskPicture->componentAlpha) {

More information about the Openchrome-devel mailing list