xserver: Branch 'master'

Maarten Maathuis madman2003 at kemper.freedesktop.org
Sun Feb 8 10:00:56 PST 2009


 dix/gc.c  |    5 +++--
 exa/exa.c |    1 -
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 1cb5afdf1ef53e72e0eef28ff6197bf5e86ef758
Author: Maarten Maathuis <madman2003 at gmail.com>
Date:   Sun Feb 8 18:59:17 2009 +0100

    dix: always NULL pGC->tile.pixmap in Create{Scratch}GC.

diff --git a/dix/gc.c b/dix/gc.c
index 0eb9238..1cf4cb8 100644
--- a/dix/gc.c
+++ b/dix/gc.c
@@ -602,6 +602,8 @@ CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus,
     pGC->fillStyle = FillSolid;
     pGC->fillRule = EvenOddRule;
     pGC->arcMode = ArcPieSlice;
+    pGC->tile.pixel = 0;
+    pGC->tile.pixmap = NullPixmap;
     if (mask & GCForeground)
     {
 	/*
@@ -609,12 +611,10 @@ CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus,
 	 * and snags the Foreground value to create a pseudo default-tile
 	 */
 	pGC->tileIsPixel = FALSE;
-	pGC->tile.pixmap = NullPixmap;
     }
     else
     {
 	pGC->tileIsPixel = TRUE;
-	pGC->tile.pixel = 0;
     }
 
     pGC->patOrg.x = 0;
@@ -932,6 +932,7 @@ CreateScratchGC(ScreenPtr pScreen, unsigned depth)
 	pGC->font->refcnt++;
     pGC->tileIsPixel = TRUE;
     pGC->tile.pixel = 0;
+    pGC->tile.pixmap = NullPixmap;
     pGC->stipple = NullPixmap;
     pGC->patOrg.x = 0;
     pGC->patOrg.y = 0;
diff --git a/exa/exa.c b/exa/exa.c
index 4a36008..a770332 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -694,7 +694,6 @@ exaValidateGC(GCPtr pGC,
 
     /* Either of these conditions is enough to trigger access to a tile pixmap. */
     /* With pGC->tileIsPixel == 1, you run the risk of dereferencing an invalid tile pixmap pointer. */
-    /* XXX: find out who is forgetting to NULL these tile pixmap pointers. */
     if (pGC->fillStyle == FillTiled || ((changes & GCTile) && !pGC->tileIsPixel)) {
 	pTile = pGC->tile.pixmap;
 


More information about the xorg-commit mailing list