[FFmpeg-cvslog] avcodec/aacdec_fixed: Fix runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
Michael Niedermayer
git at videolan.org
Tue Jun 6 01:06:58 EEST 2017
ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Sun May 28 18:09:47 2017 +0200| [5ee31596fa90a2b4211989449e6a39573c4e35e9] | committer: Michael Niedermayer
avcodec/aacdec_fixed: Fix runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
Fixes: 1878/clusterfuzz-testcase-minimized-6441918630199296
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 6b9cb5d26a2d9905093621d12785bc5903dce66d)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5ee31596fa90a2b4211989449e6a39573c4e35e9
---
libavcodec/aacdec_fixed.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/aacdec_fixed.c b/libavcodec/aacdec_fixed.c
index 0fcd350019..f4503ca137 100644
--- a/libavcodec/aacdec_fixed.c
+++ b/libavcodec/aacdec_fixed.c
@@ -210,8 +210,8 @@ static void noise_scale(int *coefs, int scale, int band_energy, int len)
for (i=0; i<len; i++) {
coefs[i] = 0;
}
- } else if (s > 0) {
- round = 1 << (s-1);
+ } else if (s >= 0) {
+ round = s ? 1 << (s-1) : 0;
for (i=0; i<len; i++) {
out = (int)(((int64_t)coefs[i] * c) >> 32);
coefs[i] = ((int)(out+round) >> s) * ssign;
More information about the ffmpeg-cvslog
mailing list