Commit 254af56d authored by Laurent Aimar's avatar Laurent Aimar Committed by Michael Niedermayer

Check for out of bound writes when building tree in bink decoder.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 36bf135d
......@@ -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