Commit 35dcc8a0 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/lagarith: fix integer overflow

Fixes: asan_heap-oob_1bf48fa_2513_lag-yuy2.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 685f7227
......@@ -128,7 +128,7 @@ static int lag_decode_prob(GetBitContext *gb, uint32_t *value)
}
val = get_bits_long(gb, bits);
val |= 1 << bits;
val |= 1U << bits;
*value = val - 1;
......
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