Module: libav
Branch: release/0.8
Commit: e96aaa5622ed2efeb3729f46331990d952208a17

Author:    Kostya Shishkov <[email protected]>
Committer: Reinhard Tartler <[email protected]>
Date:      Wed Jun 12 14:22:24 2013 +0200

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

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: [email protected]

Signed-off-by: Luca Barbato <[email protected]>
(cherry picked from commit ee205588b250fe5cae0681be8eba51a5403c3272)

Signed-off-by: Luca Barbato <[email protected]>

---

 libavcodec/smacker.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index 3928d8f..f74f0db 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -252,7 +252,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));

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to