diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-16 13:35:41 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-16 13:36:11 +0200 |
commit | e985cfd18bc416d3ff0c83ccafdc1ac733e6d522 (patch) | |
tree | f5b752c7c3aad7bc0cb1610e8840666edf065e3e /libavcodec/vc1dec.c | |
parent | c4ce8709676a6f0b41761093b0da08de72799ba9 (diff) | |
download | ffmpeg-e985cfd18bc416d3ff0c83ccafdc1ac733e6d522.tar.gz |
vc1dec: check end_mb_y / start_mb_y validity
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vc1dec.c')
-rw-r--r-- | libavcodec/vc1dec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index b8b0e73dab..f5580bfafb 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -5606,6 +5606,10 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data, 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); + if (s->end_mb_y <= s->start_mb_y) { + av_log(v->s.avctx, AV_LOG_ERROR, "end mb y %d %d invalid\n", s->end_mb_y, s->start_mb_y); + continue; + } vc1_decode_blocks(v); if (i != n_slices) s->gb = slices[i].gb; |