comparison vc1.c @ 3428:2b5c3f1bbbc4 libavcodec

Don't read out-of-bounds values.
author kostya
date Fri, 07 Jul 2006 04:50:13 +0000
parents b4363f96013d
children fb2a69de8ded
comparison
equal deleted inserted replaced
3427:94692fbebcc0 3428:2b5c3f1bbbc4
2509 /* test if block is intra and has pred */ 2509 /* test if block is intra and has pred */
2510 { 2510 {
2511 int intrapred = 0; 2511 int intrapred = 0;
2512 for(i=0; i<6; i++) 2512 for(i=0; i<6; i++)
2513 if(is_intra[i]) { 2513 if(is_intra[i]) {
2514 if(v->mb_type[0][s->block_index[i] - s->block_wrap[i]] || v->mb_type[0][s->block_index[i] - 1]) { 2514 if(((s->mb_y || (i==2 || i==3)) && v->mb_type[0][s->block_index[i] - s->block_wrap[i]])
2515 || ((s->mb_x || (i==1 || i==3)) && v->mb_type[0][s->block_index[i] - 1])) {
2515 intrapred = 1; 2516 intrapred = 1;
2516 break; 2517 break;
2517 } 2518 }
2518 } 2519 }
2519 if(intrapred)s->ac_pred = get_bits(gb, 1); 2520 if(intrapred)s->ac_pred = get_bits(gb, 1);