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:
parent
f0bf9e9c2a
commit
93927eb334
@ -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];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user