diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-12-04 13:43:18 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-12-04 13:44:22 +0100 |
commit | 2ff61c3c1a0a7d8de741ba37c7662dedb6ad4b60 (patch) | |
tree | aa08fd17e81f86f42258e06c270a0bf6f2a1722b /libavcodec | |
parent | 9d44e236187c9cfefb0602149c631f18b9303c21 (diff) | |
download | ffmpeg-2ff61c3c1a0a7d8de741ba37c7662dedb6ad4b60.tar.gz |
avcodec/dnxhddec: Fix runtime error: left shift of negative value
Fixes: 2abd25478c62a675f335fac00b467023/asan_static-oob_10aff98_1227_8811480c6ef1e970a7977ceb7e5a9958.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/dnxhddec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c index 20ca262fbd..5c09c64f8e 100644 --- a/libavcodec/dnxhddec.c +++ b/libavcodec/dnxhddec.c @@ -361,7 +361,7 @@ static av_always_inline int dnxhd_decode_dct_block(const DNXHDContext *ctx, LAST_SKIP_BITS(bs, &row->gb, len); sign = ~level >> 31; level = (NEG_USR32(sign ^ level, len) ^ sign) - sign; - row->last_dc[component] += level << dc_shift; + row->last_dc[component] += level * (1 << dc_shift); } block[0] = row->last_dc[component]; |