aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-11 15:13:53 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-20 03:41:33 +0200
commit1f8047adb8dcb970c7fc0fda581a4cbf11c062ef (patch)
treebce2d5fec18d69ef94768b9505ab138ef967240e
parentdf84fb2304d848f959482fd0825e14a990656191 (diff)
downloadffmpeg-1f8047adb8dcb970c7fc0fda581a4cbf11c062ef.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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/aacdec_fixed.c b/libavcodec/aacdec_fixed.c
index 875ef582f4..f71f458b78 100644
--- a/libavcodec/aacdec_fixed.c
+++ b/libavcodec/aacdec_fixed.c
@@ -170,7 +170,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);