From 6ad336743d861a03df3079058fdc18eee07a3014 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 31 Oct 2014 14:59:27 +0100 Subject: [PATCH] PlaylistFile: don't allow empty playlist name --- NEWS | 1 + src/PlaylistFile.cxx | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/NEWS b/NEWS index 439f39c4e..509627858 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,6 @@ ver 0.18.17 (not yet released) * playlist + - don't allow empty playlist name - m3u: recognize the file suffix ".m3u8" * decoder - faad: remove workaround for ancient libfaad2 ABI bug diff --git a/src/PlaylistFile.cxx b/src/PlaylistFile.cxx index e7dae6258..e5285ad04 100644 --- a/src/PlaylistFile.cxx +++ b/src/PlaylistFile.cxx @@ -69,6 +69,10 @@ spl_global_init(void) bool spl_valid_name(const char *name_utf8) { + if (*name_utf8 == 0) + /* empty name not allowed */ + return false; + /* * Not supporting '/' was done out of laziness, and we should * really strive to support it in the future.