From 7d8fdce2d0ef337cb86cb37fc0c436c905e04d77 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Mon, 16 Feb 2026 19:56:55 +0100 Subject: [PATCH] [codec,clear] fix destination checks check against the correct nDstWidth/nDstHeight --- libfreerdp/codec/clear.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libfreerdp/codec/clear.c b/libfreerdp/codec/clear.c index 25724fed4..0158bacfb 100644 --- a/libfreerdp/codec/clear.c +++ b/libfreerdp/codec/clear.c @@ -478,16 +478,16 @@ static BOOL clear_decompress_subcodecs_data(CLEAR_CONTEXT* WINPR_RESTRICT clear, const UINT32 nXDstRel = nXDst + xStart; const UINT32 nYDstRel = nYDst + yStart; - if (1ull * nXDstRel + width > nWidth) + if (1ull * nXDstRel + width > nDstWidth) { - WLog_ERR(TAG, "nXDstRel %" PRIu16 " + width %" PRIu16 " > nWidth %" PRIu32 "", xStart, - width, nWidth); + WLog_ERR(TAG, "nXDstRel %" PRIu32 " + width %" PRIu16 " > nDstWidth %" PRIu32 "", + nXDstRel, width, nDstWidth); return FALSE; } - if (1ull * nYDstRel + height > nHeight) + if (1ull * nYDstRel + height > nDstHeight) { - WLog_ERR(TAG, "nYDstRel %" PRIu16 " + height %" PRIu16 " > nHeight %" PRIu32 "", yStart, - height, nHeight); + WLog_ERR(TAG, "nYDstRel %" PRIu32 " + height %" PRIu16 " > nDstHeight %" PRIu32 "", + nYDstRel, height, nDstHeight); return FALSE; }