diff --git a/libavcodec/xxan.c b/libavcodec/xxan.c index 47ab54a7f9..2bc9ff697b 100644 --- a/libavcodec/xxan.c +++ b/libavcodec/xxan.c @@ -308,7 +308,7 @@ static int xan_decode_frame_type0(AVCodecContext *avctx) int dec_size; bytestream2_seek(&s->gb, 8 + corr_off, SEEK_SET); - dec_size = xan_unpack(s, s->scratch_buffer, s->buffer_size); + dec_size = xan_unpack(s, s->scratch_buffer, s->buffer_size / 2); if (dec_size < 0) dec_size = 0; for (i = 0; i < dec_size; i++)