aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-10-20 20:33:50 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-01-11 23:21:05 +0100
commit90e4862ffa5457ebee53345b9a52df5fd3842ccf (patch)
tree306e60cb873e299de03e3c0ad4ddc07d27017b59
parentb0259aa248e44dcc6960fa340d6377dd80026105 (diff)
downloadffmpeg-90e4862ffa5457ebee53345b9a52df5fd3842ccf.tar.gz
avutil/eval: Unconditionally check argument of e_div
Fixes: division by zero Fixes: 26451/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVO_fuzzer-4756955832516608 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavutil/eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/eval.c b/libavutil/eval.c
index d527f6a9d0..aaa8eb4945 100644
--- a/libavutil/eval.c
+++ b/libavutil/eval.c
@@ -317,7 +317,7 @@ static double eval_expr(Parser *p, AVExpr *e)
case e_lte: return e->value * (d <= d2 ? 1.0 : 0.0);
case e_pow: return e->value * pow(d, d2);
case e_mul: return e->value * (d * d2);
- case e_div: return e->value * ((!CONFIG_FTRAPV || d2 ) ? (d / d2) : d * INFINITY);
+ case e_div: return e->value * (d2 ? (d / d2) : d * INFINITY);
case e_add: return e->value * (d + d2);
case e_last:return e->value * d2;
case e_st : return e->value * (p->var[av_clip(d, 0, VARS-1)]= d2);