Attached.
From efa34f7cd140f4e696641ce730b8e2b97e3d8452 Mon Sep 17 00:00:00 2001
From: Paul B Mahol <one...@gmail.com>
Date: Sat, 30 Sep 2023 12:33:58 +0200
Subject: [PATCH] avcodec/lcldec: fix uncompressed buffer size calculation

The width is truncated to multiple of 2.

Signed-off-by: Paul B Mahol <one...@gmail.com>
---
 libavcodec/lcldec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
index 11e28683ba..3168f9697f 100644
--- a/libavcodec/lcldec.c
+++ b/libavcodec/lcldec.c
@@ -248,7 +248,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
                 bppx2 = 0; // will error out below
                 break;
             }
-            if (len < ((width * height * bppx2) >> 1))
+            if (len < (((width & 0xFFFFFFFC) * height * bppx2) >> 1))
                 return AVERROR_INVALIDDATA;
             break;
         }
-- 
2.42.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to