diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-01-31 16:22:53 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-09-09 13:53:29 +0200 |
commit | afc9f2c236f2289b83610b723513f68fc162abd9 (patch) | |
tree | 6495ba40f5eb5e96847e5724edcb3490bdc5c221 | |
parent | f083f20fd215ef8c0b7fa9f4abf885df6d322b8a (diff) | |
download | ffmpeg-afc9f2c236f2289b83610b723513f68fc162abd9.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 5da9a6d83b..7a3f4f9aa9 100644 --- a/libavutil/eval.c +++ b/libavutil/eval.c @@ -304,7 +304,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); |