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

Git pushed a commit to branch master
in repository ffmpeg.

commit c64c18d1fc27cd8fa142ea0ff9bd035f5dd9a46a
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Sat Nov 7 00:11:38 2026 +0100
Commit:     michaelni <[email protected]>
CommitDate: Tue Nov 17 17:54:46 2026 +0000

    avfilter/vf_separatefields: require an even chroma height
    
    With an odd number of rows in a vertically subsampled plane, the bottom
    field has one row less than the output height requires
    
    Fixes: heap-buffer-overflow (read)
    Fixes: NVD0gxXiKQI9
    
    Found during triage of the security report i9omtrAF7zcc
    
    Out of array read Replicated through UnModified FFmpeg with ASAN
---
 libavfilter/vf_separatefields.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavfilter/vf_separatefields.c b/libavfilter/vf_separatefields.c
index c0c0640dcc..4c50f5beeb 100644
--- a/libavfilter/vf_separatefields.c
+++ b/libavfilter/vf_separatefields.c
@@ -35,6 +35,7 @@ static int config_props_output(AVFilterLink *outlink)
     AVFilterLink *inlink = ctx->inputs[0];
     FilterLink       *il = ff_filter_link(inlink);
     FilterLink       *ol = ff_filter_link(outlink);
+    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
 
     s->nb_planes = av_pix_fmt_count_planes(inlink->format);
 
@@ -42,6 +43,10 @@ static int config_props_output(AVFilterLink *outlink)
         av_log(ctx, AV_LOG_ERROR, "height must be even\n");
         return AVERROR_INVALIDDATA;
     }
+    if (AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h) & 1) {
+        av_log(ctx, AV_LOG_ERROR, "chroma height must be even\n");
+        return AVERROR_INVALIDDATA;
+    }
 
     outlink->time_base.num = inlink->time_base.num;
     outlink->time_base.den = inlink->time_base.den * 2;

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