command: verify playlist name in the "rm" command
Call spl_valid_name() in spl_delete().
This commit is contained in:
parent
23e46b38ca
commit
cd69fee0a4
1
NEWS
1
NEWS
|
@ -4,6 +4,7 @@ ver 0.15.7 (2009/??/??)
|
||||||
* decoders:
|
* decoders:
|
||||||
- ffmpeg: don't try to force stereo
|
- ffmpeg: don't try to force stereo
|
||||||
* mapper: fix memory leak when playlist_directory is not set
|
* 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)
|
ver 0.15.6 (2009/11/18)
|
||||||
|
|
|
@ -323,6 +323,9 @@ spl_delete(const char *name_utf8)
|
||||||
char *path_fs;
|
char *path_fs;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (!spl_valid_name(name_utf8))
|
||||||
|
return PLAYLIST_RESULT_BAD_NAME;
|
||||||
|
|
||||||
path_fs = map_spl_utf8_to_fs(name_utf8);
|
path_fs = map_spl_utf8_to_fs(name_utf8);
|
||||||
if (path_fs == NULL)
|
if (path_fs == NULL)
|
||||||
return PLAYLIST_RESULT_DISABLED;
|
return PLAYLIST_RESULT_DISABLED;
|
||||||
|
|
Loading…
Reference in New Issue