aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-03-08 21:25:13 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-03-09 20:37:10 +0100
commit58dd25f8adb151a59971daa94d352d3226d2dbb6 (patch)
tree8f7b82d59a75ad669ffb39d1f4578286e69190b3
parent5cd3cd5b6872eda1775aa2ddb34fc23ca03c6c85 (diff)
downloadffmpeg-58dd25f8adb151a59971daa94d352d3226d2dbb6.tar.gz
avcodec/mpegaudiodec_template: Check for negative e
Fixes: undefined shift Fixes: 631/clusterfuzz-testcase-6725491035734016 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/mpegaudiodec_template.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpegaudiodec_template.c b/libavcodec/mpegaudiodec_template.c
index a3729a9e29..88f62727cb 100644
--- a/libavcodec/mpegaudiodec_template.c
+++ b/libavcodec/mpegaudiodec_template.c
@@ -251,7 +251,7 @@ static inline int l3_unscale(int value, int exponent)
if(e < 1)
av_log(NULL, AV_LOG_WARNING, "l3_unscale: e is %d\n", e);
#endif
- if (e > 31)
+ if (e > (SUINT)31)
return 0;
m = (m + (1 << (e - 1))) >> e;