summaryrefslogtreecommitdiffstats
path: root/mpvcore
diff options
context:
space:
mode:
authorBen Boeckel <mathstuf@gmail.com>2013-09-26 02:22:06 -0400
committerwm4 <wm4@nowhere>2013-09-26 18:20:32 +0200
commit828a952c9aa2d2f1427e1f21a6c1202c2191e5a9 (patch)
tree6806c731c26b4751ddfacc99f219d11a6a9c9b52 /mpvcore
parent696a8c5609ca1bf260176cb9c43f483463a72c97 (diff)
downloadmpv-828a952c9aa2d2f1427e1f21a6c1202c2191e5a9.tar.bz2
mpv-828a952c9aa2d2f1427e1f21a6c1202c2191e5a9.tar.xz
matroska: fix uninitialized memory accesses with ordered chapters
There is uninitialized memory access if the actual size isn't passed along. In the worst case, this can cause a source to be loaded against the uninitialized memory, causing a false count of found versus required sources, preventing the "Failed to find ordered chapter part" message.
Diffstat (limited to 'mpvcore')
-rw-r--r--mpvcore/timeline/tl_matroska.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mpvcore/timeline/tl_matroska.c b/mpvcore/timeline/tl_matroska.c
index cad1c3444e..4c3b705f20 100644
--- a/mpvcore/timeline/tl_matroska.c
+++ b/mpvcore/timeline/tl_matroska.c
@@ -155,6 +155,7 @@ static bool check_file_seg(struct MPContext *mpctx, struct demuxer **sources,
{
bool was_valid = false;
struct demuxer_params params = {
+ .matroska_num_wanted_uids = num_sources,
.matroska_wanted_uids = uid_map,
.matroska_wanted_segment = segment,
.matroska_was_valid = &was_valid,