aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-26 02:05:32 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-26 02:27:19 +0100
commitd73b65ed0ebc1bff4ee6bc873381230092792892 (patch)
treebdd38616add855f440ad11c133037320cc5dc1ac
parent53a3fdbfc56da54b2c0a44eb1f956ec9d67d1425 (diff)
downloadffmpeg-d73b65ed0ebc1bff4ee6bc873381230092792892.tar.gz
4xm: add assert to check that the pointer from read_huffman_tables is within the array
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/4xm.c2
1 files changed, 2 insertions, 0 deletions
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;