[FFmpeg-cvslog] libavutil/eval: Remove CONFIG_TRAPV special handling
Michael Niedermayer
git at videolan.org
Sat Feb 20 22:10:34 EET 2021
ffmpeg | branch: release/4.3 | Michael Niedermayer <michael at niedermayer.cc> | Sun Jan 31 16:22:53 2021 +0100| [aaa74324ca708587580b7783ac7ebfbe1a97dec5] | committer: Michael Niedermayer
libavutil/eval: Remove CONFIG_TRAPV special handling
Fixes: division by zero
Fixes: 29555/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVO_fuzzer-5149951447400448
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 8574fcbfc7784173347418e09035ff8121574571)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aaa74324ca708587580b7783ac7ebfbe1a97dec5
---
libavutil/eval.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavutil/eval.c b/libavutil/eval.c
index d527f6a9d0..c743ee3dfc 100644
--- a/libavutil/eval.c
+++ b/libavutil/eval.c
@@ -306,7 +306,7 @@ static double eval_expr(Parser *p, AVExpr *e)
double d = eval_expr(p, e->param[0]);
double d2 = eval_expr(p, e->param[1]);
switch (e->type) {
- case e_mod: return e->value * (d - floor((!CONFIG_FTRAPV || d2) ? d / d2 : d * INFINITY) * d2);
+ case e_mod: return e->value * (d - floor(d2 ? d / d2 : d * INFINITY) * d2);
case e_gcd: return e->value * av_gcd(d,d2);
case e_max: return e->value * (d > d2 ? d : d2);
case e_min: return e->value * (d < d2 ? d : d2);
More information about the ffmpeg-cvslog
mailing list