diff options
author | wm4 <wm4@nowhere> | 2014-01-14 17:38:08 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-01-14 17:38:08 +0100 |
commit | ae27e13a0a0d0d69ca3e91ade710ded5208f4fc6 (patch) | |
tree | 28e7f180e34f3b81cc030410918277fdc9e59fa5 /demux/ebml.h | |
parent | b51713e8e7938978a675abf1bedc2ff2d9ae7319 (diff) | |
download | mpv-ae27e13a0a0d0d69ca3e91ade710ded5208f4fc6.tar.bz2 mpv-ae27e13a0a0d0d69ca3e91ade710ded5208f4fc6.tar.xz |
demux_mkv: avoid skipping too much data in corrupted files
Until now, corrupted files were detected if the size of an element (that
should be skipped) was larger than the remaining file. This still could
skip larger regions of the file itself if the broken size happened to be
within the file.
Change it so that it's never allowed to skip outside the parent's
element.
Diffstat (limited to 'demux/ebml.h')
-rw-r--r-- | demux/ebml.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/demux/ebml.h b/demux/ebml.h index 9bfea7a8a6..2259563340 100644 --- a/demux/ebml.h +++ b/demux/ebml.h @@ -102,8 +102,8 @@ double ebml_read_float (stream_t *s, uint64_t *length); char *ebml_read_ascii (stream_t *s, uint64_t *length); char *ebml_read_utf8 (stream_t *s, uint64_t *length); int ebml_read_skip (stream_t *s, uint64_t *length); -int ebml_read_skip_or_resync_cluster(struct mp_log *log, stream_t *s, - uint64_t *length); +int ebml_read_skip_or_resync_cluster(struct mp_log *log, int64_t end, + stream_t *s); int ebml_resync_cluster(struct mp_log *log, stream_t *s); uint32_t ebml_read_master (stream_t *s, uint64_t *length); |