diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-11-11 03:19:11 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-11-11 03:19:49 +0100 |
commit | 35dcc8a0405788de392ed116dd628aef2772003d (patch) | |
tree | 7f9ef7e4df4a980ddef0ca0f3d0e664ef4ee6527 | |
parent | 685f7227dc83df9930e2a5a4d359b51b23cfc0ee (diff) | |
download | ffmpeg-35dcc8a0405788de392ed116dd628aef2772003d.tar.gz |
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>
-rw-r--r-- | libavcodec/lagarith.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/lagarith.c b/libavcodec/lagarith.c index 5f97d0f806..2c6d70c065 100644 --- a/libavcodec/lagarith.c +++ b/libavcodec/lagarith.c @@ -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; |