]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/aacdec_fixed: Fix multiple shift exponent 33 is too large for 32-bit type...
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 11 May 2017 13:13:53 +0000 (15:13 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 11 May 2017 13:51:08 +0000 (15:51 +0200)
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>
libavcodec/aacdec_fixed.c

index e3c68a97678da1fabbf9ef10e4f85b9c13f70ac7..9580370e7d755267a5f49cab74f4b166e277401a 100644 (file)
@@ -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);