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

Git pushed a commit to branch master
in repository ffmpeg.

commit 77a09f07412f5990fcd75894896eda059c8f2b73
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Thu Oct 15 04:27:22 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Sat Oct 24 20:19:14 2026 +0000

    avfilter/vf_fieldmatch: reject heights too small for the comb detection
    
    Fixes: out of array read
    Fixes: 0fHkOzVCAhre
    Fixes: swarm-OOB-read-in-combed-score-when-height-3-df4610
    
    Found-by: zhang xingxing <[email protected]>
    A height check in config_input() was suggested in the report.
    
    Out of array read Replicated through UnModified FFmpeg with ASAN
    
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavfilter/vf_fieldmatch.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavfilter/vf_fieldmatch.c b/libavfilter/vf_fieldmatch.c
index d806910364..7ce5d23fdb 100644
--- a/libavfilter/vf_fieldmatch.c
+++ b/libavfilter/vf_fieldmatch.c
@@ -955,6 +955,11 @@ static int config_input(AVFilterLink *inlink)
     const int w = inlink->w;
     const int h = inlink->h;
 
+    if (h <= fm->blocky / 2 || AV_CEIL_RSHIFT(h, pix_desc->log2_chroma_h) < 4) 
{
+        av_log(ctx, AV_LOG_ERROR, "Height %d is too small\n", h);
+        return AVERROR(EINVAL);
+    }
+
     fm->scthresh = (int64_t)((w * h * 255.0 * fm->scthresh_flt) / 100.0);
 
     if ((ret = av_image_alloc(fm->map_data,   fm->map_linesize,   w, h, 
inlink->format, 32)) < 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