1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

ff_ivi_decode_blocks: fix negative scan_pos case.

Fixes out of global array read.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-04-15 14:58:06 +02:00
parent f0bf9e9c2a
commit 93927eb334

View File

@ -417,7 +417,7 @@ int ff_ivi_decode_blocks(GetBitContext *gb, IVIBandDesc *band, IVITile *tile)
/* de-zigzag and dequantize */
scan_pos += run;
if (scan_pos >= num_coeffs)
if (scan_pos >= (unsigned)num_coeffs)
break;
pos = band->scan[scan_pos];