Module: libav Branch: release/9 Commit: 0b0f1cd44ece180e12795cfc8d0a0ac5ea3ebe2c
Author: Martin Storsjö <[email protected]> Committer: Luca Barbato <[email protected]> Date: Mon Sep 16 15:40:57 2013 +0300 rv10: Validate the dimensions set from the container Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: [email protected] Signed-off-by: Martin Storsjö <[email protected]> (cherry picked from commit 5372cda67109848d22146289e401669266217e80) Signed-off-by: Luca Barbato <[email protected]> --- libavcodec/rv10.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index 26af29f..04518dd 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -426,12 +426,15 @@ static av_cold int rv10_decode_init(AVCodecContext *avctx) RVDecContext *rv = avctx->priv_data; MpegEncContext *s = &rv->m; 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; ff_MPV_decode_defaults(s); _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
