This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch release/9.1
in repository ffmpeg.

commit 3870d7ce906907fa6978ea1607b3d893de188fa1
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Tue Nov 3 04:28:59 2026 +0100
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Sun Nov 15 02:42:44 2026 +0100

    avcodec/rawdec: require a full row of input per line for 1 to 8 bits per 
pixel
    
    Fixes: Wq9WI8WzfMaj
    Fixes: AISLE-2026-0150-00106
    Fixes: use of uninitialized memory
    Use of uninitialized memory Replicated through UnModified FFmpeg with MSAN
    
    Found-by: Joshua Rogers (AISLE)
    (cherry picked from commit 01a395b935b9da12dbeca588a7130c4db6a14689)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/rawdec.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 53d1fba583..69df3efcaa 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -205,6 +205,12 @@ static int raw_decode(AVCodecContext *avctx, AVFrame 
*frame,
         (context->is_mono || context->is_pal8) &&
         (!avctx->codec_tag || avctx->codec_tag == MKTAG('r','a','w',' ') ||
                 context->is_nut_mono || context->is_nut_pal8)) {
+        int bits = context->is_mono ? 1 :
+                   avctx->bits_per_coded_sample ? avctx->bits_per_coded_sample 
: 8;
+        if (stride < ((int64_t)avctx->width * bits + 7) / 8) {
+            av_log(avctx, AV_LOG_ERROR, "Packet too small (%d)\n", 
avpkt->size);
+            return AVERROR_INVALIDDATA;
+        }
         context->is_1_2_4_8_bpp = 1;
         if (context->is_mono) {
             int row_bytes = avctx->width / 8 + (avctx->width & 7 ? 1 : 0);

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to