diff --git a/libavcodec/xxan.c b/libavcodec/xxan.c index de1ea7f0e4..2c33f07a71 100644 --- a/libavcodec/xxan.c +++ b/libavcodec/xxan.c @@ -289,7 +289,8 @@ static int xan_decode_frame_type0(AVCodecContext *avctx) ybuf[j+1] = cur << 1; last = cur; } - ybuf[j] = last << 1; + if(j < avctx->width) + ybuf[j] = last << 1; prev_buf = ybuf; ybuf += avctx->width; }