Commit a48b24e5 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/wmadec: Fix undefined shift in wma_decode_block()

Found-by: Clang -fsanitize=shift
Reported-by: 's avatarThierry Foucu <tfoucu@google.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 73ebbfdf
...@@ -697,7 +697,7 @@ static int wma_decode_block(WMACodecContext *s) ...@@ -697,7 +697,7 @@ static int wma_decode_block(WMACodecContext *s)
/* very high freqs : noise */ /* very high freqs : noise */
n = s->block_len - s->coefs_end[bsize]; n = s->block_len - s->coefs_end[bsize];
mult1 = mult * exponents[((-1 << bsize)) >> esize]; mult1 = mult * exponents[(-(1 << bsize)) >> esize];
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
*coefs++ = s->noise_table[s->noise_index] * mult1; *coefs++ = s->noise_table[s->noise_index] * mult1;
s->noise_index = (s->noise_index + 1) & (NOISE_TAB_SIZE - 1); s->noise_index = (s->noise_index + 1) & (NOISE_TAB_SIZE - 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment