diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c index a89cbd3896..ca9194f576 100644 --- a/libavcodec/smacker.c +++ b/libavcodec/smacker.c @@ -246,7 +246,7 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int ctx.recode2 = tmp2.values; ctx.last = last; - huff.length = ((size + 3) >> 2) + 3; + huff.length = ((size + 3) >> 2) + 4; huff.maxlength = 0; huff.current = 0; huff.values = av_mallocz(huff.length * sizeof(int));