Browse Source

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

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.11
Michael Niedermayer 14 years ago
parent
commit
3118e3b137
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/lagarithrac.c

+ 1
- 1
libavcodec/lagarithrac.c View File

@@ -45,7 +45,7 @@ void ff_lag_rac_init(lag_rac *l, GetBitContext *gb, int length)

l->range = 0x80;
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++) {
unsigned r = i << l->hash_shift;


Loading…
Cancel
Save