Module: libav Branch: release/9 Commit: f8602ef7176d45521ea82176c9342e9298e119a8
Author: Luca Barbato <[email protected]> Committer: Luca Barbato <[email protected]> Date: Mon Jul 22 12:44:19 2013 +0200 4xm: Reject not a multiple of 16 dimension Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: [email protected] (cherry picked from commit 2f034f255c49050e894ab9b88087c09ebe249f3f) Signed-off-by: Luca Barbato <[email protected]> --- libavcodec/4xm.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c index 99e0e2e..cc0361d 100644 --- a/libavcodec/4xm.c +++ b/libavcodec/4xm.c @@ -810,6 +810,12 @@ static int decode_frame(AVCodecContext *avctx, void *data, if (buf_size < 20) return AVERROR_INVALIDDATA; + if (avctx->width % 16 || avctx->height % 16) { + av_log(avctx, AV_LOG_ERROR, + "Dimensions non-multiple of 16 are invalid.\n"); + return AVERROR_INVALIDDATA; + } + if (buf_size < AV_RL32(buf + 4) + 8) { av_log(f->avctx, AV_LOG_ERROR, "size mismatch %d %d\n", buf_size, AV_RL32(buf + 4)); _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
