command: verify playlist name in the "rm" command

Call spl_valid_name() in spl_delete().
This commit is contained in:
Max Kellermann 2009-12-08 08:30:33 +01:00
parent 23e46b38ca
commit cd69fee0a4
2 changed files with 4 additions and 0 deletions

1
NEWS
View File

@ -4,6 +4,7 @@ ver 0.15.7 (2009/??/??)
* decoders:
- ffmpeg: don't try to force stereo
* mapper: fix memory leak when playlist_directory is not set
* command: verify playlist name in the "rm" command
ver 0.15.6 (2009/11/18)

View File

@ -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;