From 5372cda67109848d22146289e401669266217e80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 16 Sep 2013 15:40:57 +0300 Subject: [PATCH] rv10: Validate the dimensions set from the container MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö --- libavcodec/rv10.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index 0d3b64865b..2c76bb2585 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -432,6 +432,9 @@ static av_cold int rv10_decode_init(AVCodecContext *avctx) av_log(avctx, AV_LOG_ERROR, "Extradata is too small.\n"); return AVERROR_INVALIDDATA; } + if ((ret = av_image_check_size(avctx->coded_width, + avctx->coded_height, 0, avctx)) < 0) + return ret; ff_MPV_decode_defaults(s);