PR #24611 opened by michaelni URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24611 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24611.patch
Found-by: zhang xingxing Fixes: double evaluation of the clip() argument Fixes: QI0lR8gkbkbN Fixes: swarm-e_clip-double-evaluates-first-parameter-8c8411 >From 66bbf7af436f08d05b5668a62d10cf85518de3b1 Mon Sep 17 00:00:00 2001 From: zhang xingxing <[email protected]> Date: Mon, 21 Sep 2026 06:13:29 +0200 Subject: [PATCH] avutil/eval: evaluate the first argument of clip() only once Found-by: zhang xingxing Fixes: double evaluation of the clip() argument Fixes: QI0lR8gkbkbN Fixes: swarm-e_clip-double-evaluates-first-parameter-8c8411 --- libavutil/eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/eval.c b/libavutil/eval.c index 2bd07b98c1..9b5ad21849 100644 --- a/libavutil/eval.c +++ b/libavutil/eval.c @@ -222,7 +222,7 @@ static double eval_expr(Parser *p, AVExpr *e) double min = eval_expr(p, e->param[1]), max = eval_expr(p, e->param[2]); if (isnan(min) || isnan(max) || isnan(x) || min > max) return NAN; - return e->value * av_clipd(eval_expr(p, e->param[0]), min, max); + return e->value * av_clipd(x, min, max); } case e_between: { double d = eval_expr(p, e->param[0]); -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
