[FFmpeg-cvslog] smacker: fix an off by one in huff.length computation

Kostya Shishkov git at videolan.org
Tue Aug 27 15:59:05 CEST 2013


ffmpeg | branch: release/1.1 | Kostya Shishkov <kostya.shishkov at gmail.com> | Wed Jun 12 14:22:24 2013 +0200| [1a0cdd18b0cc3373c3a1348a8d5a4dab86a994d5] | committer: Luca Barbato

smacker: fix an off by one in huff.length computation

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org

Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
(cherry picked from commit ee205588b250fe5cae0681be8eba51a5403c3272)

Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1a0cdd18b0cc3373c3a1348a8d5a4dab86a994d5
---

 libavcodec/smacker.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index b20a7b6..8c26e1e 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));



More information about the ffmpeg-cvslog mailing list