1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-07-18 10:21:39 +02:00

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>
This commit is contained in:
Michael Niedermayer 2015-03-14 17:11:59 +01:00
parent 73ebbfdff0
commit a48b24e5eb

View File

@ -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);