diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-09-27 01:02:17 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-27 15:15:54 +0200 |
commit | 254af56dd101bc756194dd080bb99e8f123500dd (patch) | |
tree | 92d24578945858df6c6215d9ad9bda3a0bc7a757 | |
parent | 36bf135d4c32973933000a819208df7da9dd3e16 (diff) | |
download | ffmpeg-254af56dd101bc756194dd080bb99e8f123500dd.tar.gz |
Check for out of bound writes when building tree in bink decoder.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/bink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/bink.c b/libavcodec/bink.c index 3c2148b3c6..ac12a4bdc4 100644 --- a/libavcodec/bink.c +++ b/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 { |