From 7285f2e836c56c31a42b8c18a7ebd0e8a7d78fa1 Mon Sep 17 00:00:00 2001 From: Zhigang Gong Date: Fri, 16 Dec 2011 20:15:33 +0800 Subject: [PATCH] Make sure the devPrivate.ptr of a textured pixmap is NULL. Just in case when wrongly fallback to DDX layer and cause random memory corruption. Pointed out by Chris. Signed-off-by: Zhigang Gong --- glamor/glamor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/glamor/glamor.c b/glamor/glamor.c index 369368336..630df4f58 100644 --- a/glamor/glamor.c +++ b/glamor/glamor.c @@ -116,6 +116,7 @@ glamor_set_pixmap_texture(PixmapPtr pixmap, int w, int h, unsigned int tex) pixmap->drawable. bitsPerPixel + 7) / 8) + 3) & ~3, NULL); + pixmap->devPrivate.ptr = NULL; } /* Set screen pixmap. If tex equal to 0, means it is called from ephyr. */