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

    avfilter/vf_feedback: clamp the position without integer overflow
    
    Fixes: out of array read
    Fixes: signed integer overflow
    Fixes: hrmKDBP9CvuA
    
    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
    Signed integer overflow Replicated through UnModified FFmpeg with UBSAN
    
    (cherry picked from commit bdbb6ad49cedcd4706c2cfee8eace894ae1a0452)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavfilter/vf_feedback.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vf_feedback.c b/libavfilter/vf_feedback.c
index e3633d7d37..0665bde221 100644
--- a/libavfilter/vf_feedback.c
+++ b/libavfilter/vf_feedback.c
@@ -46,10 +46,8 @@ typedef struct FeedbackContext {
 
 static void adjust_pos(AVFilterContext *ctx, FeedbackContext *s)
 {
-    if (s->x + s->w > ctx->inputs[0]->w)
-        s->x = ctx->inputs[0]->w - s->w;
-    if (s->y + s->h > ctx->inputs[0]->h)
-        s->y = ctx->inputs[0]->h - s->h;
+    s->x = FFMIN(s->x, ctx->inputs[0]->w - s->w);
+    s->y = FFMIN(s->y, ctx->inputs[0]->h - s->h);
 }
 
 static void adjust_parameters(AVFilterContext *ctx, FeedbackContext *s)

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