[FFmpeg-cvslog] avcodec/aacdec_fixed: Fix undefined shift in noise_scale()
Michael Niedermayer
git at videolan.org
Fri May 10 22:03:36 EEST 2019
ffmpeg | branch: release/3.2 | Michael Niedermayer <michael at niedermayer.cc> | Fri Mar 29 08:58:49 2019 +0100| [3adb15617d5db5fb9b57c64ea0c6a91c57587a0a] | committer: Michael Niedermayer
avcodec/aacdec_fixed: Fix undefined shift in noise_scale()
Fixes: 13655/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5120559430500352
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 8ea211ab79d646f6d0af0945971ee55f36bfcbc9)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3adb15617d5db5fb9b57c64ea0c6a91c57587a0a
---
libavcodec/aacdec_fixed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/aacdec_fixed.c b/libavcodec/aacdec_fixed.c
index c92f873335..90b933e6b6 100644
--- a/libavcodec/aacdec_fixed.c
+++ b/libavcodec/aacdec_fixed.c
@@ -221,7 +221,7 @@ static void noise_scale(int *coefs, int scale, int band_energy, int len)
}
else {
s = s + 32;
- round = 1 << (s-1);
+ round = s ? 1 << (s-1) : 0;
for (i=0; i<len; i++) {
out = (int)((int64_t)((int64_t)coefs[i] * c + round) >> s);
coefs[i] = out * ssign;
More information about the ffmpeg-cvslog
mailing list