song: don't allow calling song_get_url(NULL)
The runtime check suggests that the author has somehow thought song_get_url(NULL) might be valid. It should not be. Replace it with an assertion.
This commit is contained in:
@@ -37,10 +37,7 @@ static void decodeStart(void)
|
||||
char path_max_fs[MPD_PATH_MAX];
|
||||
char path_max_utf8[MPD_PATH_MAX];
|
||||
|
||||
if (!song_get_url(dc.next_song, path_max_utf8)) {
|
||||
dc.error = DECODE_ERROR_FILE;
|
||||
goto stop_no_close;
|
||||
}
|
||||
song_get_url(dc.next_song, path_max_utf8);
|
||||
if (!isRemoteUrl(path_max_utf8)) {
|
||||
rmp2amp_r(path_max_fs,
|
||||
utf8_to_fs_charset(path_max_fs, path_max_utf8));
|
||||
|
||||
Reference in New Issue
Block a user