diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c index f06d60fabd..f30d4b3089 100644 --- a/libavcodec/smacker.c +++ b/libavcodec/smacker.c @@ -257,7 +257,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));