aboutsummaryrefslogtreecommitdiff
path: root/src/stored_playlist.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-12-08 08:30:33 +0100
committerMax Kellermann <max@duempel.org>2009-12-08 08:32:26 +0100
commitcd69fee0a46e6b64ea9c76ccb83e601e098f3e07 (patch)
tree3f82061b092093a6ab5d939e0314f1c69fa0ad16 /src/stored_playlist.c
parent23e46b38ca03aa7d83c93df0df51ce5e986b7928 (diff)
command: verify playlist name in the "rm" command
Call spl_valid_name() in spl_delete().
Diffstat (limited to 'src/stored_playlist.c')
-rw-r--r--src/stored_playlist.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/stored_playlist.c b/src/stored_playlist.c
index f283ab98..131c2098 100644
--- a/src/stored_playlist.c
+++ b/src/stored_playlist.c
@@ -323,6 +323,9 @@ spl_delete(const char *name_utf8)
char *path_fs;
int ret;
+ if (!spl_valid_name(name_utf8))
+ return PLAYLIST_RESULT_BAD_NAME;
+
path_fs = map_spl_utf8_to_fs(name_utf8);
if (path_fs == NULL)
return PLAYLIST_RESULT_DISABLED;