xserver: Branch 'master' - 2 commits

Keith Packard keithp at kemper.freedesktop.org
Thu Dec 1 06:44:54 PST 2011


 Xext/shm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 05f09354a30a4f5edd421220e1aa97be754c71bb
Merge: 3197b77... 08ec4da...
Author: Keith Packard <keithp at keithp.com>
Date:   Thu Dec 1 14:44:52 2011 +0000

    Merge remote-tracking branch 'jcristau/for-keith'

commit 08ec4da6a7617637914bee1636858474213cf39d
Author: Julien Cristau <jcristau at debian.org>
Date:   Sat Nov 5 13:00:07 2011 +0100

    Fix ShmPutImage for XYBitmap
    
    We can't call CopyArea in that case because the image has depth 1, which
    might not match the target drawable, so we might overrun the shm
    segment.  Commit 11817a881cb93a89788105d1e575a468f2a8d27c apparently
    fixed a similar bug for XYPixmap, but missed the bitmap case.
    
    Fixes: http://bugs.debian.org/629611
    
    Thanks to Alan Curry for diagnosing this and providing a test case.
    
    Reported-and-tested-by: Alan Curry <pacman at kosh.dhis.org>
    Reviewed-by: Peter Harris <pharris at opentext.com>
    Signed-off-by: Julien Cristau <jcristau at debian.org>

diff --git a/Xext/shm.c b/Xext/shm.c
index 9c8beb2..7ca027a 100644
--- a/Xext/shm.c
+++ b/Xext/shm.c
@@ -481,7 +481,7 @@ doShmPutImage(DrawablePtr dst, GCPtr pGC,
 {
     PixmapPtr pPixmap;
 
-    if (format == ZPixmap || depth == 1) {
+    if (format == ZPixmap || (format == XYPixmap && depth == 1)) {
 	pPixmap = GetScratchPixmapHeader(dst->pScreen, w, h, depth,
 					 BitsPerPixel(depth),
 					 PixmapBytePad(w, depth),


More information about the xorg-commit mailing list