Browse Source

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>
tags/n2.5
Michael Niedermayer 11 years ago
parent
commit
35dcc8a040
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/lagarith.c

+ 1
- 1
libavcodec/lagarith.c View File

@@ -128,7 +128,7 @@ static int lag_decode_prob(GetBitContext *gb, uint32_t *value)
} }


val = get_bits_long(gb, bits); val = get_bits_long(gb, bits);
val |= 1 << bits;
val |= 1U << bits;


*value = val - 1; *value = val - 1;




Loading…
Cancel
Save