aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-10-31 14:59:27 +0100
committerMax Kellermann <max@duempel.org>2014-10-31 14:59:27 +0100
commit7350144ab36879ec92fdad3f4d3919913e660799 (patch)
tree0260204f23439fe10630266aa6070b15755c2142 /src
parent54c591bd9d9657065fb1c338eefe416840c78d3e (diff)
downloadmpd-7350144ab36879ec92fdad3f4d3919913e660799.tar.gz
mpd-7350144ab36879ec92fdad3f4d3919913e660799.tar.xz
mpd-7350144ab36879ec92fdad3f4d3919913e660799.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 f0aa2d2d7..ab269378a 100644
--- a/src/PlaylistFile.cxx
+++ b/src/PlaylistFile.cxx
@@ -64,6 +64,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.