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 273b381bf3033b6cf7eec19819949fb590add531
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Thu Nov 12 01:31:47 2026 +0100
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Thu Nov 19 14:55:43 2026 +0100

    avfilter/af_ladspa: check the control index before using it
    
    Fixes: out of array read
    Fixes: okPC857hfRXh
    
    Found during the triage of a finding from the review of 
https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25800
    
    Out of array read Replicated through UnModified FFmpeg with ASAN
    
    (cherry picked from commit 573784882c12abf0f6c30978d6b748457dd6a218)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavfilter/af_ladspa.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavfilter/af_ladspa.c b/libavfilter/af_ladspa.c
index ea5eb1a2ef..cf51c8bea5 100644
--- a/libavfilter/af_ladspa.c
+++ b/libavfilter/af_ladspa.c
@@ -452,8 +452,7 @@ static int set_control(AVFilterContext *ctx, unsigned long 
port, LADSPA_Data val
 {
     LADSPAContext *s = ctx->priv;
     const char *label = s->desc->Label;
-    LADSPA_PortRangeHint *h = (LADSPA_PortRangeHint *)s->desc->PortRangeHints +
-                              s->icmap[port];
+    LADSPA_PortRangeHint *h;
 
     if (port >= s->nb_inputcontrols) {
         av_log(ctx, AV_LOG_ERROR, "Control c%ld is out of range [0 - %lu].\n",
@@ -461,6 +460,8 @@ static int set_control(AVFilterContext *ctx, unsigned long 
port, LADSPA_Data val
         return AVERROR(EINVAL);
     }
 
+    h = (LADSPA_PortRangeHint *)s->desc->PortRangeHints + s->icmap[port];
+
     if (LADSPA_IS_HINT_BOUNDED_BELOW(h->HintDescriptor) &&
             value < h->LowerBound) {
         av_log(ctx, AV_LOG_ERROR,

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