changeset 11899:18bd28454ef6

Do not try to seek beyond the end of the stream when parsing the headers.
author mosu
date Sat, 31 Jan 2004 09:54:09 +0000
parents 41efae8120b6
children 25248bff4a57
files libmpdemux/demux_mkv.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mkv.c	Sat Jan 31 09:38:01 2004 +0000
+++ b/libmpdemux/demux_mkv.c	Sat Jan 31 09:54:09 2004 +0000
@@ -1237,7 +1237,8 @@
       length -= l + il;
 
       if (seek_id == 0 || seek_id == MATROSKA_ID_CLUSTER
-          || seek_pos == EBML_UINT_INVALID)
+          || seek_pos == EBML_UINT_INVALID ||
+          ((mkv_d->segment_start + seek_pos) >= (uint64_t)demuxer->movi_end))
         continue;
 
       saved_pos = stream_tell (s);