diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-09-27 16:16:41 +0400 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2011-10-08 18:25:56 +0400 |
commit | 24adf7832b8370f3c1febbef6c686f574d360d32 (patch) | |
tree | e10a4793244c019f365ee10582f1682d5144f8fe /libavcodec/bink.c | |
parent | ac6eab1496aad6f8b09deabbef4fe5fd829e142d (diff) |
bink: Check for out of bound writes when building tree
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
Diffstat (limited to 'libavcodec/bink.c')
-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 e4fdf4c93e..8a8a912867 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 { |