aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlaylistFile.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-10-31 14:59:27 +0100
committerMax Kellermann <max@duempel.org>2014-11-02 11:52:48 +0100
commit6ad336743d861a03df3079058fdc18eee07a3014 (patch)
treee0c85b63af041ee0b2d54003d7878a3b1f588779 /src/PlaylistFile.cxx
parentc882568ccd5271a3f2c9d97a9a718706f9e71a65 (diff)
downloadmpd-6ad336743d861a03df3079058fdc18eee07a3014.tar.gz
mpd-6ad336743d861a03df3079058fdc18eee07a3014.tar.xz
mpd-6ad336743d861a03df3079058fdc18eee07a3014.zip
PlaylistFile: don't allow empty playlist name
Diffstat (limited to '')
-rw-r--r--src/PlaylistFile.cxx4
1 files changed, 4 insertions, 0 deletions
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.