diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c index 2bd35d22d0..8b91ed3645 100644 --- a/libavcodec/shorten.c +++ b/libavcodec/shorten.c @@ -432,6 +432,7 @@ static int shorten_decode_frame(AVCodecContext *avctx, void *data, av_log(avctx, AV_LOG_ERROR, "error allocating bitstream buffer\n"); return AVERROR(ENOMEM); } + memset(tmp_ptr, 0, s->allocated_bitstream_size); s->bitstream = tmp_ptr; }