From d73b65ed0ebc1bff4ee6bc873381230092792892 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 26 Jan 2013 02:05:32 +0100 Subject: [PATCH] 4xm: add assert to check that the pointer from read_huffman_tables is within the array Signed-off-by: Michael Niedermayer --- libavcodec/4xm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c index 39254f7c07..9ea84364b0 100644 --- a/libavcodec/4xm.c +++ b/libavcodec/4xm.c @@ -760,6 +760,8 @@ static int decode_i_frame(FourXContext *f, const uint8_t *buf, int length) if (!prestream) return -1; + av_assert0(prestream <= buf + length); + init_get_bits(&f->gb, buf + 4, 8 * bitstream_size); prestream_size = length + buf - prestream;