Commit bd4c4c86 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/wma: Fix undefined shift in ff_wma_run_level_decode()

Found-by: Clang -fsanitize=shift
Reported-by: 's avatarThierry Foucu <tfoucu@google.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent e5dfa436
......@@ -451,7 +451,7 @@ int ff_wma_run_level_decode(AVCodecContext *avctx, GetBitContext *gb,
/** normal code */
offset += run_table[code];
sign = get_bits1(gb) - 1;
iptr[offset & coef_mask] = ilvl[code] ^ sign << 31;
iptr[offset & coef_mask] = ilvl[code] ^ (sign & 0x80000000);
} else if (code == 1) {
/** EOB */
break;
......
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