mirror of https://git.ffmpeg.org/ffmpeg.git
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:
parent
36bf135d4c
commit
254af56dd1
|
@ -247,7 +247,7 @@ static void read_tree(GetBitContext *gb, Tree *tree)
|
||||||
tree->syms[i] = get_bits(gb, 4);
|
tree->syms[i] = get_bits(gb, 4);
|
||||||
tmp1[tree->syms[i]] = 1;
|
tmp1[tree->syms[i]] = 1;
|
||||||
}
|
}
|
||||||
for (i = 0; i < 16; i++)
|
for (i = 0; i < 16 && len < 16 - 1; i++)
|
||||||
if (!tmp1[i])
|
if (!tmp1[i])
|
||||||
tree->syms[++len] = i;
|
tree->syms[++len] = i;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue