Check for out-of-bounds access

Originally committed as revision 7797 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Kostya Shishkov 2007-02-01 18:39:49 +00:00
parent 286c71074a
commit b956373b6f
1 changed files with 2 additions and 2 deletions

View File

@ -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]; ac_val -= 16 * s->block_wrap[n];
q1 = s->current_picture.qscale_table[mb_pos]; 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 && c_avail && mb_pos) 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 && 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(n && n<4) q2 = q1;
if(coded) { if(coded) {