[WIN32SS:GDI] Fix an off-by-one error in the StretchBlt mask bounds check (#9136)

The mask bounds check in `DIB_XXBPP_StretchBlt` allowed `sx == cx` (and similar for `sy`),
reading one pixel past the end of the mask bitmap.
On the contrary, the source-surface check a few lines below already does it right.
This commit is contained in:
Ahmed Arif
2026-06-27 17:03:48 +02:00
committed by GitHub
parent 02f2314139
commit c0f18d059a
+1 -1
View File
@@ -174,7 +174,7 @@ BOOLEAN DIB_XXBPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf, SURFOBJ *Ma
sx = SourceRect->left+(DesX - DestRect->left) * SrcWidth / DstWidth;
}
if (sx < 0 || sy < 0 ||
MaskSurf->sizlBitmap.cx < sx || MaskCy < sy ||
MaskSurf->sizlBitmap.cx <= sx || MaskCy <= sy ||
fnMask_GetPixel(MaskSurf, sx, sy) != 0)
{
CanDraw = FALSE;