Module: libav Branch: release/0.8 Commit: 8006716f215582ed396d9392809a174c26209f97
Author: Luca Barbato <lu_z...@gentoo.org> Committer: Sean McGovern <gsean...@gmail.com> 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 file changed, 5 insertions(+) diff --git a/libavcodec/xl.c b/libavcodec/xl.c index 0ebc946..d45866d 100644 --- a/libavcodec/xl.c +++ b/libavcodec/xl.c @@ -69,6 +69,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