[FFmpeg-cvslog] rv10: Validate the dimensions set from the container
Martin Storsjö
git at videolan.org
Thu Jan 16 22:08:50 CET 2014
ffmpeg | branch: release/0.10 | Martin Storsjö <martin at martin.st> | Mon Sep 16 15:40:57 2013 +0300| [3b169044ca042f1bc82a7e55bbf72062b051c75f] | committer: Luca Barbato
rv10: Validate the dimensions set from the container
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
Signed-off-by: Martin Storsjö <martin at martin.st>
(cherry picked from commit 5372cda67109848d22146289e401669266217e80)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
(cherry picked from commit 0b0f1cd44ece180e12795cfc8d0a0ac5ea3ebe2c)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3b169044ca042f1bc82a7e55bbf72062b051c75f
---
libavcodec/rv10.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
index 4f64ec2..59bd968 100644
--- a/libavcodec/rv10.c
+++ b/libavcodec/rv10.c
@@ -425,12 +425,15 @@ static av_cold int rv10_decode_init(AVCodecContext *avctx)
{
MpegEncContext *s = avctx->priv_data;
static int done=0;
- int major_ver, minor_ver, micro_ver;
+ int major_ver, minor_ver, micro_ver, ret;
if (avctx->extradata_size < 8) {
av_log(avctx, AV_LOG_ERROR, "Extradata is too small.\n");
return -1;
}
+ if ((ret = av_image_check_size(avctx->coded_width,
+ avctx->coded_height, 0, avctx)) < 0)
+ return ret;
MPV_decode_defaults(s);
More information about the ffmpeg-cvslog
mailing list