smacker: fix an off by one in huff.length computation
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
parent
985f34b756
commit
f52edef301
@ -246,7 +246,7 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int
|
|||||||
ctx.recode2 = tmp2.values;
|
ctx.recode2 = tmp2.values;
|
||||||
ctx.last = last;
|
ctx.last = last;
|
||||||
|
|
||||||
huff.length = ((size + 3) >> 2) + 3;
|
huff.length = ((size + 3) >> 2) + 4;
|
||||||
huff.maxlength = 0;
|
huff.maxlength = 0;
|
||||||
huff.current = 0;
|
huff.current = 0;
|
||||||
huff.values = av_mallocz(huff.length * sizeof(int));
|
huff.values = av_mallocz(huff.length * sizeof(int));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user