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>
This commit is contained in:
parent
9d44e23618
commit
2ff61c3c1a
@ -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];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user