mirror of https://git.ffmpeg.org/ffmpeg.git
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: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
685f7227dc
commit
35dcc8a040
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue