diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-07-28 18:24:15 +0200 |
---|---|---|
committer | Sean McGovern <gseanmcg@gmail.com> | 2013-09-23 19:25:50 -0400 |
commit | 8006716f215582ed396d9392809a174c26209f97 (patch) | |
tree | 3033cb310a8343795b33f70597193450a3ee28c3 | |
parent | 246e0e2c994f0fad30d89ff39bd1fabca30c53ce (diff) | |
download | ffmpeg-8006716f215582ed396d9392809a174c26209f97.tar.gz |
xl: Make sure the width is valid
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
-rw-r--r-- | libavcodec/xl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/xl.c b/libavcodec/xl.c index 0ebc9467e0..d45866df8b 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; |