diff options
author | Paul B Mahol <onemda@gmail.com> | 2017-11-12 22:57:06 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2017-11-12 22:58:15 +0100 |
commit | f38d0d0c22c1871ef0728a718c5e00a6ba93bfa1 (patch) | |
tree | 5d8758f7d3cce86622df78a048d48b6617888dad /libavformat | |
parent | a38b14a432b3a031d6bafdbb5f790724b9b2094d (diff) | |
download | ffmpeg-f38d0d0c22c1871ef0728a718c5e00a6ba93bfa1.tar.gz |
avformat/ty: check cur_chunk_pos before using it
Fixes #6831.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/ty.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/ty.c b/libavformat/ty.c index ba874280ea..d348643f40 100644 --- a/libavformat/ty.c +++ b/libavformat/ty.c @@ -378,6 +378,8 @@ static void parse_master(AVFormatContext *s) ty->cur_chunk_pos = 32; for (j = 0; j < ty->seq_table_size; j++) { + if (ty->cur_chunk_pos >= CHUNK_SIZE - 8) + return; ty->seq_table[j].timestamp = AV_RB64(ty->chunk + ty->cur_chunk_pos); ty->cur_chunk_pos += 8; if (map_size > 8) { |