aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-11 13:32:08 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-11 15:27:54 +0100
commitbd4c4c868c37c7495216422e17c8b9c8e8a74c4a (patch)
treeffe539df7d265de85d54a9bc46971774a23ac712
parente5dfa4361955803ac10911a005803c1e514b6ca7 (diff)
downloadffmpeg-bd4c4c868c37c7495216422e17c8b9c8e8a74c4a.tar.gz
avcodec/wma: Fix undefined shift in ff_wma_run_level_decode()
Found-by: Clang -fsanitize=shift Reported-by: Thierry Foucu <tfoucu@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/wma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/wma.c b/libavcodec/wma.c
index d8949d5f5f..99a87f62fa 100644
--- a/libavcodec/wma.c
+++ b/libavcodec/wma.c
@@ -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;