From 7350144ab36879ec92fdad3f4d3919913e660799 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Fri, 31 Oct 2014 14:59:27 +0100
Subject: PlaylistFile: don't allow empty playlist name

---
 src/PlaylistFile.cxx | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'src')

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.
-- 
cgit v1.2.3