diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-09-27 12:16:41 +0000 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2012-03-18 17:50:35 +0100 |
commit | c98d7882d8c67475bc756ebc956fed3d4d2ca696 (patch) | |
tree | 75c934096ca4ab60b77f1611574ee5cfe7a78911 /libavcodec | |
parent | e52e85ac3ab6527a38e950142ea92f203909bf96 (diff) | |
download | ffmpeg-c98d7882d8c67475bc756ebc956fed3d4d2ca696.tar.gz |
bink: Check for out of bound writes when building tree
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
(cherry picked from commit 24adf7832b8370f3c1febbef6c686f574d360d32)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec')
-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 4f30618ff5..420d08a0f4 100644 --- a/libavcodec/bink.c +++ b/libavcodec/bink.c @@ -246,7 +246,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 { |