[FFmpeg-cvslog] bink: Check for out of bound writes when building tree
Laurent Aimar
git at videolan.org
Mon Mar 19 05:30:30 CET 2012
ffmpeg | branch: release/0.8 | Laurent Aimar <fenrir at videolan.org> | Tue Sep 27 12:16:41 2011 +0000| [c98d7882d8c67475bc756ebc956fed3d4d2ca696] | committer: Reinhard Tartler
bink: Check for out of bound writes when building tree
Signed-off-by: Janne Grunau <janne-libav at jannau.net>
(cherry picked from commit 24adf7832b8370f3c1febbef6c686f574d360d32)
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c98d7882d8c67475bc756ebc956fed3d4d2ca696
---
libavcodec/bink.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/bink.c b/libavcodec/bink.c
index 4f30618..420d08a 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 {
More information about the ffmpeg-cvslog
mailing list