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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/2/head
Laurent Aimar 14 years ago committed by Michael Niedermayer
parent 36bf135d4c
commit 254af56dd1
  1. 2
      libavcodec/bink.c

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

Loading…
Cancel
Save