diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2007-02-01 18:39:49 +0000 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2007-02-01 18:39:49 +0000 |
commit | b956373b6f62bfc72b71070b50f1f053225cab8a (patch) | |
tree | 761a00ee1db6d5650c9e29492dd297add0a0f07f /libavcodec | |
parent | 286c71074ad85a1c16f23867b6fe29b62142a514 (diff) | |
download | ffmpeg-b956373b6f62bfc72b71070b50f1f053225cab8a.tar.gz |
Check for out-of-bounds access
Originally committed as revision 7797 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vc1.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index 5649484a9f..0c17083039 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -2890,8 +2890,8 @@ static int vc1_decode_i_block_adv(VC1Context *v, DCTELEM block[64], int n, int c ac_val -= 16 * s->block_wrap[n]; q1 = s->current_picture.qscale_table[mb_pos]; - if(dc_pred_dir && c_avail) q2 = s->current_picture.qscale_table[mb_pos - 1]; - if(!dc_pred_dir && a_avail) q2 = s->current_picture.qscale_table[mb_pos - s->mb_stride]; + if(dc_pred_dir && c_avail && mb_pos) q2 = s->current_picture.qscale_table[mb_pos - 1]; + if(!dc_pred_dir && a_avail && mb_pos >= s->mb_stride) q2 = s->current_picture.qscale_table[mb_pos - s->mb_stride]; if(n && n<4) q2 = q1; if(coded) { |