xserver: Branch 'master'

Adam Jackson ajax at kemper.freedesktop.org
Wed Dec 6 15:17:51 UTC 2017


 hw/xwayland/xwayland-cursor.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 97ac59b1ed3624f7c04e54dd3e3dadfa46a8f170
Author: Olivier Fourdan <ofourdan at redhat.com>
Date:   Wed Sep 27 18:01:01 2017 +0200

    xwayland: Fix non-argb cursor conversion
    
    From the bug: "What happens if bits->width is less than 8? :)"
    
    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=103012
    Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
    Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
    Reviewed-by: Daniel Stone <daniels at collabora.com>

diff --git a/hw/xwayland/xwayland-cursor.c b/hw/xwayland/xwayland-cursor.c
index c95f4e830..cf8395f1d 100644
--- a/hw/xwayland/xwayland-cursor.c
+++ b/hw/xwayland/xwayland-cursor.c
@@ -42,7 +42,7 @@ expand_source_and_mask(CursorPtr cursor, CARD32 *data)
         (cursor->foreGreen & 0xff00) | (cursor->foreGreen >> 8);
     bg = ((cursor->backRed & 0xff00) << 8) |
         (cursor->backGreen & 0xff00) | (cursor->backGreen >> 8);
-    stride = (bits->width / 8 + 3) & ~3;
+    stride = BitmapBytePad(bits->width);
     for (y = 0; y < bits->height; y++)
         for (x = 0; x < bits->width; x++) {
             i = y * stride + x / 8;


More information about the xorg-commit mailing list