1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Laurent Aimar 2011-09-27 01:02:17 +02:00 committed by Michael Niedermayer
parent 36bf135d4c
commit 254af56dd1

View File

@ -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 {