diff options
author | Janne Grunau <janne-libav@jannau.net> | 2012-01-25 18:49:54 +0400 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2012-02-01 15:54:39 +0400 |
commit | 510ef04a461b3b54a762c6141ad880cbed85981f (patch) | |
tree | be49c13066e1885b86da45073495fec631f36c43 /libavcodec/vc1dec.c | |
parent | cb0b284381ea506a54c59c4968cd2c2c937f4d75 (diff) |
vc1: prevent null pointer dereference on broken files
CC: libav-stable@libav.org
Diffstat (limited to 'libavcodec/vc1dec.c')
-rw-r--r-- | libavcodec/vc1dec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index 325cc64fef..417bd046b7 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -5709,7 +5709,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data, if (!v->field_mode || v->second_field) s->end_mb_y = (i == n_slices ) ? mb_height : FFMIN(mb_height, slices[i].mby_start % mb_height); else - s->end_mb_y = (i == n_slices1 + 1) ? mb_height : FFMIN(mb_height, slices[i].mby_start % mb_height); + s->end_mb_y = (i <= n_slices1 + 1) ? mb_height : FFMIN(mb_height, slices[i].mby_start % mb_height); vc1_decode_blocks(v); if (i != n_slices) s->gb = slices[i].gb; |