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

Kostya Shishkov git at videolan.org
Mon Jun 17 00:34:46 CEST 2013


ffmpeg | branch: master | Kostya Shishkov <kostya.shishkov at gmail.com> | Wed Jun 12 14:22:24 2013 +0200| [f52edef30197735bfb937e9e723ab1e7b31165c6] | 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>

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

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

diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index a89cbd3..ca9194f 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