diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-01-31 16:22:53 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-10-17 21:34:53 +0200 |
commit | e15298bb269c7f1da2ed80fb305f2d6e41c54531 (patch) | |
tree | 359ca99733320518ef73d362d8b0e39a770a9c57 | |
parent | 480a9a4b1d9c49dea054311b30a0615618a43a71 (diff) | |
download | ffmpeg-e15298bb269c7f1da2ed80fb305f2d6e41c54531.tar.gz |
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@niedermayer.cc>
(cherry picked from commit 8574fcbfc7784173347418e09035ff8121574571)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavutil/eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/eval.c b/libavutil/eval.c index 7642b919cb..d72d18bda3 100644 --- a/libavutil/eval.c +++ b/libavutil/eval.c @@ -284,7 +284,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); |