From 600cbf367231b187c6d7194810c3b350f8fa1d39 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 16 Jun 2014 18:45:18 +0200 Subject: [PATCH] avcodec/bitstream: zero vlc tables on allocation Signed-off-by: Michael Niedermayer --- libavcodec/bitstream.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c index 5cb8631755..2d3f6067d3 100644 --- a/libavcodec/bitstream.c +++ b/libavcodec/bitstream.c @@ -117,6 +117,7 @@ static int alloc_table(VLC *vlc, int size, int use_static) vlc->table_size = 0; return AVERROR(ENOMEM); } + memset(vlc->table + vlc->table_allocated - (1 << vlc->bits), 0, sizeof(VLC_TYPE) * 2 << vlc->bits); } return index; }