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

Git pushed a commit to branch master
in repository ffmpeg.

commit a1a4a6224ff2ea5dd2a07f8b6aae2c217352e281
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Thu Nov 12 01:24:33 2026 +0100
Commit:     michaelni <[email protected]>
CommitDate: Tue Nov 17 03:59:35 2026 +0000

    avfilter/vf_pseudocolor: restore the index when a command fails
    
    Fixes: out of array read
    Fixes: NULL pointer dereference
    Fixes: leN4LX7HLBxe
    
    Found during the triage of a finding from the review of 
https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25800
    
    Out of array read and NULL pointer dereference Replicated through 
UnModified FFmpeg with ASAN
---
 libavfilter/vf_pseudocolor.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_pseudocolor.c b/libavfilter/vf_pseudocolor.c
index 793278ce89..e2ffa7b257 100644
--- a/libavfilter/vf_pseudocolor.c
+++ b/libavfilter/vf_pseudocolor.c
@@ -1025,12 +1025,18 @@ static int filter_frame(AVFilterLink *inlink, AVFrame 
*in)
 static int process_command(AVFilterContext *ctx, const char *cmd, const char 
*args,
                            char *res, int res_len, int flags)
 {
+    PseudoColorContext *s = ctx->priv;
+    int index = s->index;
     int ret = ff_filter_process_command(ctx, cmd, args, res, res_len, flags);
 
     if (ret < 0)
         return ret;
 
-    return config_input(ctx->inputs[0]);
+    ret = config_input(ctx->inputs[0]);
+    if (ret < 0)
+        s->index = index;
+
+    return ret;
 }
 
 static const AVFilterPad inputs[] = {

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