diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-11 15:13:53 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-16 16:00:23 +0200 |
commit | 79c489952a8c5de772e06d4f3d8fbcd0e18e9357 (patch) | |
tree | f958108bfaa7522e71ab4aff6acedd08d99c5bec | |
parent | 7edd1cd6fa9f4e8eaf0819a48c13e1f1d7dbf674 (diff) | |
download | ffmpeg-79c489952a8c5de772e06d4f3d8fbcd0e18e9357.tar.gz |
avcodec/aacdec_fixed: Fix multiple shift exponent 33 is too large for 32-bit type 'int'
Fixes: 1471/clusterfuzz-testcase-minimized-6376460543590400
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3a0ff78168f80f5b2c5c5544325aca4023bc67a4)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/aacdec_fixed.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/aacdec_fixed.c b/libavcodec/aacdec_fixed.c index acb8178337..6a5bdebe89 100644 --- a/libavcodec/aacdec_fixed.c +++ b/libavcodec/aacdec_fixed.c @@ -171,7 +171,11 @@ static void subband_scale(int *dst, int *src, int scale, int offset, int len) s = offset - (s >> 2); - if (s > 0) { + if (s > 31) { + for (i=0; i<len; i++) { + dst[i] = 0; + } + } else if (s > 0) { round = 1 << (s-1); for (i=0; i<len; i++) { out = (int)(((int64_t)src[i] * c) >> 32); |