[PATCH 2/4] fb: Clear invalid plane mask bits in GetImage

Keith Packard keithp at keithp.com
Mon Jan 13 18:00:37 PST 2014


Anything outside of the depth should not end up in the resulting image.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 fb/fbimage.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fb/fbimage.c b/fb/fbimage.c
index 59daa21..75e38c2 100644
--- a/fb/fbimage.c
+++ b/fb/fbimage.c
@@ -260,6 +260,7 @@ fbGetImage(DrawablePtr pDrawable,
     }
     else {
         dstStride = BitmapBytePad(w) / sizeof(FbStip);
+        planeMask &= FbFullMask(pDrawable->depth);
         fbBltPlane(src + (y + srcYoff) * srcStride,
                    srcStride,
                    (x + srcXoff) * srcBpp,
-- 
1.8.5.2



More information about the xorg-devel mailing list