From 9ae37b094f1b7a06c745a3c932547edf6f4222ea Mon Sep 17 00:00:00 2001 From: akallabeth Date: Wed, 4 Sep 2024 22:01:09 +0200 Subject: [PATCH] fix implicit widening of multiplication result --- server/shadow/X11/x11_shadow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/shadow/X11/x11_shadow.c b/server/shadow/X11/x11_shadow.c index c30215ae5..8c43e25e3 100644 --- a/server/shadow/X11/x11_shadow.c +++ b/server/shadow/X11/x11_shadow.c @@ -678,8 +678,8 @@ static int x11_shadow_blend_cursor(x11ShadowSubsystem* subsystem) for (size_t y = 0; y < nHeight; y++) { - const BYTE* pSrcPixel = &pSrcData[((nYSrc + y) * nSrcStep) + (nXSrc * 4)]; - BYTE* pDstPixel = &pDstData[((nYDst + y) * nDstStep) + (nXDst * 4)]; + const BYTE* pSrcPixel = &pSrcData[((nYSrc + y) * nSrcStep) + (4ULL * nXSrc)]; + BYTE* pDstPixel = &pDstData[((nYDst + y) * nDstStep) + (4ULL * nXDst)]; for (size_t x = 0; x < nWidth; x++) {