Commit 93927eb3 authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f0bf9e9c
......@@ -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];
......
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