aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2013-06-12 14:22:24 +0200
committerLuca Barbato <lu_zero@gentoo.org>2013-06-16 15:55:53 +0200
commitf52edef30197735bfb937e9e723ab1e7b31165c6 (patch)
treebbfbc9d006264e2edd60ce37736cc038dadee028
parent985f34b75653d02eda8eb8def3412f8577f19b01 (diff)
downloadffmpeg-f52edef30197735bfb937e9e723ab1e7b31165c6.tar.gz
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>
-rw-r--r--libavcodec/smacker.c2
1 files changed, 1 insertions, 1 deletions
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));