1
mirror of https://github.com/mpv-player/mpv synced 2024-11-03 03:19:24 +01:00

demux_edl: fix undefined behavior if mp4 init segment is not provided

param_names[n] is only valid for n<nparam.
This commit is contained in:
wm4 2018-03-01 12:20:49 +01:00 committed by Jan Ekström
parent 3263f47d33
commit 9f802d134b

View File

@ -138,7 +138,7 @@ static struct tl_parts *parse_edl(bstr str)
bstr type = param_vals[0]; // value, because no "="
if (bstr_equals0(type, "mp4_dash")) {
tl->dash = true;
if (bstr_equals0(param_names[1], "init"))
if (nparam > 1 && bstr_equals0(param_names[1], "init"))
tl->init_fragment_url = bstrto0(tl, param_vals[1]);
}
continue;