[vlc-commits] m3u: skip BOM before demuxing (fixes #21860)
Rémi Denis-Courmont
git at videolan.org
Sun Oct 4 14:37:55 CEST 2020
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Oct 4 15:36:46 2020 +0300| [3ee52d7be0f14d72b625cccd2f9e03b51577ba41] | committer: Rémi Denis-Courmont
m3u: skip BOM before demuxing (fixes #21860)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3ee52d7be0f14d72b625cccd2f9e03b51577ba41
---
modules/demux/playlist/m3u.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/demux/playlist/m3u.c b/modules/demux/playlist/m3u.c
index b56e1c13e1..5e484d9869 100644
--- a/modules/demux/playlist/m3u.c
+++ b/modules/demux/playlist/m3u.c
@@ -109,6 +109,9 @@ int Import_M3U( vlc_object_t *p_this )
if (!match)
return VLC_EGENERIC;
+ if (offset > 0 && vlc_stream_Read(p_stream->s, NULL, offset) < offset)
+ return VLC_EGENERIC;
+
msg_Dbg( p_stream, "found valid M3U playlist" );
p_stream->p_sys = pf_dup;
p_stream->pf_readdir = ReadDir;
More information about the vlc-commits
mailing list