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 d4ffe42b9349375d1fc0d23ffb9060f376b6f342
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Wed Nov 11 15:22:27 2026 +0100
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Sun Nov 15 21:19:57 2026 +0100

    avcodec/huffyuvenc: require all luma rows the median predictor reads
    
    Fixes: out of array read
    Fixes: dx18scXFJJxI
    
    Found during the review of https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25573
    
    Out of array read Replicated through UnModified FFmpeg with ASAN
    Out of array read Replicated through API with ASAN
    
    (cherry picked from commit 9bb91c4b26b4905415f61cca7cacd68c1a9e6072)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/huffyuvenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/huffyuvenc.c b/libavcodec/huffyuvenc.c
index 0719557667..d18c835c6b 100644
--- a/libavcodec/huffyuvenc.c
+++ b/libavcodec/huffyuvenc.c
@@ -372,7 +372,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
 
     if (s->predictor == MEDIAN && s->version <= 2 &&
         (avctx->width < 4 ||
-         AV_CEIL_RSHIFT(avctx->height, s->chroma_v_shift) < 2 + 
s->interlaced)) {
+         avctx->height < (2 + s->interlaced) << s->chroma_v_shift)) {
         av_log(avctx, AV_LOG_ERROR, "Frame too small for the median 
predictor\n");
         return AVERROR(EINVAL);
     }

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