Commit 24adf783 authored by Laurent Aimar's avatar Laurent Aimar Committed by Janne Grunau

bink: Check for out of bound writes when building tree

Signed-off-by: 's avatarJanne Grunau <janne-libav@jannau.net>
parent ac6eab14
......@@ -247,7 +247,7 @@ static void read_tree(GetBitContext *gb, Tree *tree)
tree->syms[i] = get_bits(gb, 4);
tmp1[tree->syms[i]] = 1;
}
for (i = 0; i < 16; i++)
for (i = 0; i < 16 && len < 16 - 1; i++)
if (!tmp1[i])
tree->syms[++len] = i;
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment