Module: libav Branch: release/0.8 Commit: d19e3e19d67b50cb5614ead2e0f125678e1c257d
Author: Janne Grunau <[email protected]> Committer: Reinhard Tartler <[email protected]> Date: Wed Jan 25 15:49:54 2012 +0100 vc1: prevent null pointer dereference on broken files CC: [email protected] (cherry picked from commit 510ef04a461b3b54a762c6141ad880cbed85981f) Signed-off-by: Anton Khirnov <[email protected]> --- libavcodec/vc1dec.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index fa95273..0425a87 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -5708,7 +5708,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; _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
