aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-14 17:11:59 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-14 17:32:12 +0100
commita48b24e5ebdb21d25512ac481a1d396e7685f0a4 (patch)
treee7316457e236badd7aba2664dddb3995bc042915
parent73ebbfdff0bb2c22e3b5c14b11485e5798a317fd (diff)
downloadffmpeg-a48b24e5ebdb21d25512ac481a1d396e7685f0a4.tar.gz
avcodec/wmadec: Fix undefined shift in wma_decode_block()
Found-by: Clang -fsanitize=shift Reported-by: Thierry Foucu <tfoucu@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/wmadec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
index d80bd2bb71..ffbf511adc 100644
--- a/libavcodec/wmadec.c
+++ b/libavcodec/wmadec.c
@@ -697,7 +697,7 @@ static int wma_decode_block(WMACodecContext *s)
/* very high freqs : noise */
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++) {
*coefs++ = s->noise_table[s->noise_index] * mult1;
s->noise_index = (s->noise_index + 1) & (NOISE_TAB_SIZE - 1);