summaryrefslogtreecommitdiff
path: root/libavcodec/rv10.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2013-09-16 15:40:57 +0300
committerMartin Storsjö <martin@martin.st>2013-09-19 11:08:54 +0300
commit5372cda67109848d22146289e401669266217e80 (patch)
treee4e9767c6d32b2be1322b65885760bb95a19f643 /libavcodec/rv10.c
parentae0f316a4778e473d407cffa8392595ba0735153 (diff)
rv10: Validate the dimensions set from the container
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/rv10.c')
-rw-r--r--libavcodec/rv10.c3
1 files changed, 3 insertions, 0 deletions
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);