Module: libav Branch: release/9 Commit: 116aa30db4ae28f0b67cb2861ea534bfb840f3bc
Author: Luca Barbato <lu_z...@gentoo.org> Committer: Luca Barbato <lu_z...@gentoo.org> Date: Sun Jul 28 18:24:15 2013 +0200 xl: Make sure the width is valid CC: libav-sta...@libav.org Signed-off-by: Luca Barbato <lu_z...@gentoo.org> --- libavcodec/xl.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/libavcodec/xl.c b/libavcodec/xl.c index 1cadeab..240339e 100644 --- a/libavcodec/xl.c +++ b/libavcodec/xl.c @@ -71,6 +71,11 @@ static int decode_frame(AVCodecContext *avctx, stride = avctx->width - 4; + if (avctx->width % 4) { + av_log(avctx, AV_LOG_ERROR, "Width not a multiple of 4.\n"); + return AVERROR_INVALIDDATA; + } + if (buf_size < avctx->width * avctx->height) { av_log(avctx, AV_LOG_ERROR, "Packet is too small\n"); return AVERROR_INVALIDDATA; _______________________________________________ libav-commits mailing list libav-commits@libav.org https://lists.libav.org/mailman/listinfo/libav-commits