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@redhat.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
a4c1e29082
commit
97ac59b1ed
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user