aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/smacker.c
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:58:22 +0200
commit1a0cdd18b0cc3373c3a1348a8d5a4dab86a994d5 (patch)
tree2b03de73d2bbfa59bdc100ca7b456e7ff874aaea /libavcodec/smacker.c
parentd33b0f72245da71f7121b08116ef8732731f5adf (diff)
downloadffmpeg-1a0cdd18b0cc3373c3a1348a8d5a4dab86a994d5.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> (cherry picked from commit ee205588b250fe5cae0681be8eba51a5403c3272) Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/smacker.c')
-rw-r--r--libavcodec/smacker.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index b20a7b6d10..8c26e1ec4f 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));