diff options
author | Janne Grunau <janne-libav@jannau.net> | 2012-01-24 21:50:50 +0100 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2012-02-26 10:03:14 +0100 |
commit | ba418ad4005a2cc2f18cdfa089d0bcd55225b30e (patch) | |
tree | 46009be380a33def2cbc0a84ee1eacfb0ce23fb2 | |
parent | 6dcbbdc0116a50370d66f0f20d74a70d56568382 (diff) | |
download | ffmpeg-ba418ad4005a2cc2f18cdfa089d0bcd55225b30e.tar.gz |
rv20: prevent calling ff_h263_decode_mba() with unset height/width
Prevents a crash of VLC during playback of a invalid matroska file,
found by John Villamil <johnv@matasano.com>.
CC: libav-stable@libav.org
(cherry picked from commit c3e10ae4127c998b809066926a410f40ebd47593)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r-- | libavcodec/rv10.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index 1d78c92c46..ccc09443ec 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -362,7 +362,8 @@ static int rv20_decode_picture_header(MpegEncContext *s) if(s->avctx->debug & FF_DEBUG_PICT_INFO){ av_log(s->avctx, AV_LOG_DEBUG, "F %d/%d\n", f, rpr_bits); } - } + } else if (av_image_check_size(s->width, s->height, 0, s->avctx) < 0) + return AVERROR_INVALIDDATA; mb_pos = ff_h263_decode_mba(s); |