[codec,clear] fix off by one length check

This commit is contained in:
akallabeth
2026-01-15 12:19:53 +01:00
parent 25102b432f
commit f8688b57f6

View File

@@ -876,12 +876,12 @@ static BOOL clear_decompress_bands_data(CLEAR_CONTEXT* WINPR_RESTRICT clear,
if (count > nHeight)
count = nHeight;
if (nXDstRel + i > nDstWidth)
if (nXDstRel + i >= nDstWidth)
return FALSE;
for (UINT32 y = 0; y < count; y++)
{
if (nYDstRel + y > nDstHeight)
if (nYDstRel + y >= nDstHeight)
return FALSE;
BYTE* pDstPixel8 =