summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demux/demux_mkv.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c
index 90c027188f..f51349621e 100644
--- a/demux/demux_mkv.c
+++ b/demux/demux_mkv.c
@@ -2506,14 +2506,12 @@ static int read_block(demuxer_t *demuxer, int64_t end, struct block_info *block)
goto exit;
/* time (relative to cluster time) */
- if (stream_tell(s) + 3 >= endpos)
+ if (stream_tell(s) + 3 > endpos)
goto exit;
uint8_t c1 = stream_read_char(s);
uint8_t c2 = stream_read_char(s);
time = c1 << 8 | c2;
- if (stream_tell(s) + 2 > endpos)
- goto exit;
uint8_t header_flags = stream_read_char(s);
block->filepos = stream_tell(s);