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

Git pushed a commit to branch master
in repository ffmpeg.

commit 8e55f4f3e9eb05073b2738e7a3d99670777e5e04
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Tue Sep 15 04:16:24 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Wed Sep 23 18:56:12 2026 +0000

    avcodec/v210dec: reject a custom_stride smaller than one row
    
    Fixes: out of array read
    Fixes: Tn2SZ3jxoKOi
    Found-by: Zheng Yu @ Depthfirst
    Found-by: zhang xingxing
    
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/v210dec.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c
index 8b370e5659..c4ca12c1f7 100644
--- a/libavcodec/v210dec.c
+++ b/libavcodec/v210dec.c
@@ -162,6 +162,11 @@ static int decode_frame(AVCodecContext *avctx, AVFrame 
*pic,
         }
     }
 
+    if (stride > 0 && stride < v210_stride(avctx->width, 6)) {
+        av_log(avctx, AV_LOG_ERROR, "custom_stride %d is smaller than one 
row\n", stride);
+        return AVERROR_INVALIDDATA;
+    }
+
     if (stride == 0 && ((avctx->width & 1) || (int64_t)avctx->width * 
avctx->height > INT_MAX / 6)) {
         av_log(avctx, AV_LOG_ERROR, "Strideless v210 is not supported for size 
%dx%d\n", avctx->width, avctx->height);
         return AVERROR_INVALIDDATA;

-- 
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