aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ivi_common.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-15 14:58:06 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-15 14:59:21 +0200
commit93927eb334dce961603645dd4ed9772bb2400cc4 (patch)
tree133f2a7166dc9c3e0f5dd0c0e4e010ff5e1699d0 /libavcodec/ivi_common.c
parentf0bf9e9c2a65e9a2b9d9e4e94f99acb191dc7ae7 (diff)
downloadffmpeg-93927eb334dce961603645dd4ed9772bb2400cc4.tar.gz
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>
Diffstat (limited to 'libavcodec/ivi_common.c')
-rw-r--r--libavcodec/ivi_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index ba8853bbec..c5039b32c9 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -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];