From 827a4c3faa27e0c186452585b15094eee1119085 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 03:25:12 +0200 Subject: Merging upstream version 3.5.0+dfsg1. Signed-off-by: Daniel Baumann --- libfreerdp/codec/clear.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libfreerdp/codec/clear.c') diff --git a/libfreerdp/codec/clear.c b/libfreerdp/codec/clear.c index 5c009d8..512aeae 100644 --- a/libfreerdp/codec/clear.c +++ b/libfreerdp/codec/clear.c @@ -409,7 +409,7 @@ static BOOL clear_decompress_residual_data(CLEAR_CONTEXT* clear, wStream* s, } } - if ((pixelIndex + runLengthFactor) > pixelCount) + if ((pixelIndex >= pixelCount) || (runLengthFactor > (pixelCount - pixelIndex))) { WLog_ERR(TAG, "pixelIndex %" PRIu32 " + runLengthFactor %" PRIu32 " > pixelCount %" PRIu32 -- cgit v1.2.3