Module: libav Branch: release/9 Commit: 3ac156b707932e93ed5e1f23ca866e251fafb743
Author: Martin Storsjö <[email protected]> Committer: Luca Barbato <[email protected]> Date: Sun Sep 29 01:04:05 2013 +0300 xxan: Disallow odd width Decoded data is always written in pairs within this decoder. This fixes writes out of bounds. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: [email protected] Signed-off-by: Martin Storsjö <[email protected]> (cherry picked from commit aa0dd52434768da64f1f3d8ae92bcf980c1adffc) Signed-off-by: Luca Barbato <[email protected]> --- libavcodec/xxan.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/xxan.c b/libavcodec/xxan.c index 84ffdec..7a0cdc4 100644 --- a/libavcodec/xxan.c +++ b/libavcodec/xxan.c @@ -49,6 +49,10 @@ static av_cold int xan_decode_init(AVCodecContext *avctx) av_log(avctx, AV_LOG_ERROR, "Invalid frame height: %d.\n", avctx->height); return AVERROR(EINVAL); } + if (avctx->width & 1) { + av_log(avctx, AV_LOG_ERROR, "Invalid frame width: %d.\n", avctx->width); + return AVERROR(EINVAL); + } s->buffer_size = avctx->width * avctx->height; s->y_buffer = av_malloc(s->buffer_size); _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
