diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2006-07-07 04:50:13 +0000 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2006-07-07 04:50:13 +0000 |
commit | 928dc49d0e37db50a9d1359ef910cb1856aabfaf (patch) | |
tree | c1c008ef3ce6936580608cc5ad62df7ae6279bb6 | |
parent | 1ede1725f156c9e06e1f08c9f9b43ee12b540f56 (diff) | |
download | ffmpeg-928dc49d0e37db50a9d1359ef910cb1856aabfaf.tar.gz |
Don't read out-of-bounds values.
Originally committed as revision 5650 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/vc1.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index e3b9834a88..4975e55c89 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -2511,7 +2511,8 @@ static int vc1_decode_p_mb(VC1Context *v, DCTELEM block[6][64]) int intrapred = 0; for(i=0; i<6; i++) if(is_intra[i]) { - if(v->mb_type[0][s->block_index[i] - s->block_wrap[i]] || v->mb_type[0][s->block_index[i] - 1]) { + if(((s->mb_y || (i==2 || i==3)) && v->mb_type[0][s->block_index[i] - s->block_wrap[i]]) + || ((s->mb_x || (i==1 || i==3)) && v->mb_type[0][s->block_index[i] - 1])) { intrapred = 1; break; } |