From 44938d481803209f65f9ef9097802045d219ea29 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 16 Apr 2026 09:30:56 +1000 Subject: [PATCH] modesetting: Fix double increment in cursor buffer cleanup loop Fixes: 1f41320e1c42 ("modesetting: Use a more optimal hw cursor size") Part-of: --- hw/xfree86/drivers/modesetting/drmmode_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index 8497c5f07..04917e9c5 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -1885,7 +1885,7 @@ drmmode_load_cursor_argb_check(xf86CrtcPtr crtc, CARD32 *image) ptr[i++] = cpu_to_le32(image[y * ms->max_cursor_width + x]); } /* clear the remainder for good measure */ - for (; i < ms->max_cursor_width * ms->max_cursor_height; i++) + while (i < ms->max_cursor_width * ms->max_cursor_height) ptr[i++] = 0; if (drmmode_crtc->cursor_up)