Commit 3118e3b1 authored by Michael Niedermayer's avatar Michael Niedermayer

ff_lag_rac_init: fix signedness error leading to out of array read.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 20335598
...@@ -45,7 +45,7 @@ void ff_lag_rac_init(lag_rac *l, GetBitContext *gb, int length) ...@@ -45,7 +45,7 @@ void ff_lag_rac_init(lag_rac *l, GetBitContext *gb, int length)
l->range = 0x80; l->range = 0x80;
l->low = *l->bytestream >> 1; l->low = *l->bytestream >> 1;
l->hash_shift = FFMAX(l->scale - 8, 0); l->hash_shift = FFMAX((int)l->scale - 8, 0);
for (i = j = 0; i < 256; i++) { for (i = j = 0; i < 256; i++) {
unsigned r = i << l->hash_shift; unsigned r = i << l->hash_shift;
......
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