[FFmpeg-cvslog] 4xm: add assert to check that the pointer from read_huffman_tables is within the array

Michael Niedermayer git at videolan.org
Sat Jan 26 02:33:41 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jan 26 02:05:32 2013 +0100| [d73b65ed0ebc1bff4ee6bc873381230092792892] | committer: Michael Niedermayer

4xm: add assert to check that the pointer from read_huffman_tables is within the array

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d73b65ed0ebc1bff4ee6bc873381230092792892
---

 libavcodec/4xm.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 39254f7..9ea8436 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;



More information about the ffmpeg-cvslog mailing list