summaryrefslogtreecommitdiffstats
path: root/libavcodec/aacdec_fixed.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-23 12:40:22 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-23 16:11:27 +0200
commit620b452a118a6a2345addb4e1d8abf36ad8d1bab (patch)
tree75856334b011091b123f8371fbb9e4fa4141b9d0 /libavcodec/aacdec_fixed.c
parent37de7f71758bd0ce2e3912bd70b223a718602e09 (diff)
downloadffmpeg-streaming-620b452a118a6a2345addb4e1d8abf36ad8d1bab.zip
ffmpeg-streaming-620b452a118a6a2345addb4e1d8abf36ad8d1bab.tar.gz
avcodec/aacdec_fixed: Fix multiple runtime error: shift exponent 127 is too large for 32-bit type 'int'
Fixes: 1762/clusterfuzz-testcase-minimized-5150981081792512 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/aacdec_fixed.c')
-rw-r--r--libavcodec/aacdec_fixed.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/aacdec_fixed.c b/libavcodec/aacdec_fixed.c
index 7b5e40e..2754766 100644
--- a/libavcodec/aacdec_fixed.c
+++ b/libavcodec/aacdec_fixed.c
@@ -415,7 +415,9 @@ static void apply_independent_coupling_fixed(AACContext *ac,
c = cce_scale_fixed[gain & 7];
shift = (gain-1024) >> 3;
- if (shift < 0) {
+ if (shift < -31) {
+ return;
+ } else if (shift < 0) {
shift = -shift;
round = 1 << (shift - 1);
OpenPOWER on IntegriCloud