mirror of https://github.com/mpv-player/mpv
demux_edl: don't try to extract dirname from self-expanding protocols
Fixes infinite recursion. Trying to extract dirname from string of memory://<data> is not really a good idea. Found by OSS-Fuzz.
This commit is contained in:
parent
14571f0f77
commit
66fdec8a67
|
@ -567,8 +567,13 @@ error:
|
|||
|
||||
static void fix_filenames(struct tl_parts *parts, char *source_path)
|
||||
{
|
||||
if (!bstrcasecmp0(mp_split_proto(bstr0(source_path), NULL), "edl"))
|
||||
bstr proto = mp_split_proto(bstr0(source_path), NULL);
|
||||
// Don't adjust self-expanding protocols
|
||||
if (!bstrcasecmp0(proto, "memory") || !bstrcasecmp0(proto, "lavf") ||
|
||||
!bstrcasecmp0(proto, "hex") || !bstrcasecmp0(proto, "edl"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
struct bstr dirname = mp_dirname(source_path);
|
||||
for (int n = 0; n < parts->num_parts; n++) {
|
||||
struct tl_part *part = &parts->parts[n];
|
||||
|
|
Loading…
Reference in New Issue