Mercurial > libavcodec.hg
changeset 3428:2b5c3f1bbbc4 libavcodec
Don't read out-of-bounds values.
author | kostya |
---|---|
date | Fri, 07 Jul 2006 04:50:13 +0000 |
parents | 94692fbebcc0 |
children | fb2a69de8ded |
files | vc1.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/vc1.c Thu Jul 06 21:41:54 2006 +0000 +++ b/vc1.c Fri Jul 07 04:50:13 2006 +0000 @@ -2511,7 +2511,8 @@ 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; }