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 7fbbf4a927f9d6589bd8b57c15cac236fade3f34
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Fri Nov 6 03:52:55 2026 +0100
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Sun Nov 15 06:17:20 2026 +0100

    avfilter/vf_selectivecolor: check the correction method read from the psfile
    
    Fixes: out of array read
    Fixes: urb6qL5xnaVD
    Fixes: 
swarm-Unvalidated-correction_method-from-psfile-causes-OOB-function-pointer-read-f780a0
    
    Found-by: zhang xingxing <[email protected]>
    The same check was suggested in the report.
    
    Out of array read Replicated through UnModified FFmpeg with ASAN and UBSAN
    
    (cherry picked from commit d5f2e3ef8e049cb3c17e06e1c39b6cfb571b9e7c)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavfilter/vf_selectivecolor.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavfilter/vf_selectivecolor.c b/libavfilter/vf_selectivecolor.c
index 4fa8b32f3c..6d27bdacb0 100644
--- a/libavfilter/vf_selectivecolor.c
+++ b/libavfilter/vf_selectivecolor.c
@@ -210,6 +210,10 @@ static int parse_psfile(AVFilterContext *ctx, const char 
*fname)
                "the settings might not be loaded properly\n", version);
 
     READ16(s->correction_method);
+    if (s->correction_method >= NB_CORRECTION_METHODS) {
+        ret = AVERROR_INVALIDDATA;
+        goto end;
+    }
 
     // 1st CMYK entry is reserved/unused
     for (i = 0; i < FF_ARRAY_ELEMS(s->cmyk_adjust[0]); i++) {

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