diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-03-29 08:58:49 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-12-02 19:41:48 +0100 |
commit | 7a5f875e989816f61f15334d8cf1a97f4f7a9388 (patch) | |
tree | 570b82681758af0b7d57320f3fa686febcad34e9 | |
parent | 37b2a19afa25b08443bd3828c9b4b95308561789 (diff) | |
download | ffmpeg-7a5f875e989816f61f15334d8cf1a97f4f7a9388.tar.gz |
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@niedermayer.cc>
(cherry picked from commit 8ea211ab79d646f6d0af0945971ee55f36bfcbc9)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/aacdec_fixed.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aacdec_fixed.c b/libavcodec/aacdec_fixed.c index 40363ba6bb..3ba4cc0016 100644 --- a/libavcodec/aacdec_fixed.c +++ b/libavcodec/aacdec_fixed.c @@ -220,7 +220,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; |