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:
Michael Niedermayer 2014-11-11 03:19:11 +01:00
parent 685f7227dc
commit 35dcc8a040
1 changed files with 1 additions and 1 deletions

View File

@ -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;