diff options
author | Luca Barbato <[email protected]> | 2013-07-28 18:24:15 +0200 |
---|---|---|
committer | Luca Barbato <[email protected]> | 2013-08-24 16:01:02 +0200 |
commit | 116aa30db4ae28f0b67cb2861ea534bfb840f3bc (patch) | |
tree | 2654a89af47527da531d00b425fd747072fe97cd | |
parent | e6cf47ee9e36f249f63e7dee5f99ad8b5386eaa4 (diff) |
xl: Make sure the width is valid
CC: [email protected]
Signed-off-by: Luca Barbato <[email protected]>
-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 1cadeab561..240339ea8b 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; |