diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c index 8db4533221..ffa32d12aa 100644 --- a/libavcodec/binkaudio.c +++ b/libavcodec/binkaudio.c @@ -306,6 +306,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, buf = av_realloc(s->packet_buffer, avpkt->size + FF_INPUT_BUFFER_PADDING_SIZE); if (!buf) return AVERROR(ENOMEM); + memset(buf + avpkt->size, 0, FF_INPUT_BUFFER_PADDING_SIZE); s->packet_buffer = buf; memcpy(s->packet_buffer, avpkt->data, avpkt->size); if ((ret = init_get_bits8(gb, s->packet_buffer, avpkt->size)) < 0)