[FFmpeg-devel] [PATCH 3/3] Check for out of bound writes when building tree in bink decoder.
fenrir at elivagar.org
fenrir at elivagar.org
Tue Sep 27 01:02:17 CEST 2011
From: Laurent Aimar <fenrir at videolan.org>
---
libavcodec/bink.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/bink.c b/libavcodec/bink.c
index 6447c96..e358772 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 {
--
1.7.2.5
More information about the ffmpeg-devel
mailing list