From de42e11662f3f002033b28876b6a03e0313ba8a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Fri, 1 Nov 2024 13:53:26 +0100 Subject: [PATCH] demux_edl: disallow nested edl to avoid infinite loop Found by OSS-Fuzz. --- DOCS/interface-changes/edl.txt | 1 + demux/demux_edl.c | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 DOCS/interface-changes/edl.txt diff --git a/DOCS/interface-changes/edl.txt b/DOCS/interface-changes/edl.txt new file mode 100644 index 0000000000..1264f567b6 --- /dev/null +++ b/DOCS/interface-changes/edl.txt @@ -0,0 +1 @@ +nested edl are no longer supported; flatten the edl or use a playlist with multiple edl entries diff --git a/demux/demux_edl.c b/demux/demux_edl.c index 96f76c9066..7f7dde2c84 100644 --- a/demux/demux_edl.c +++ b/demux/demux_edl.c @@ -451,6 +451,10 @@ static struct timeline_par *build_timeline(struct timeline *root, struct tl_part *part = &parts->parts[n]; struct demuxer *source = NULL; + if (!bstrcasecmp0(mp_split_proto(bstr0(part->filename), NULL), "edl")) { + MP_ERR(root, "Nested EDL is not allowed.\n"); + goto error; + } if (tl->dash) { part->offset = starttime; if (part->length <= 0)