MusicPlayerDaemon / mpdscribble

a MPD client which submits information about tracks being played to a scrobbler (e.g. last.fm)
GNU General Public License v2.0
117 stars 15 forks source link

mpdscribble 0.24 crashes when $HOME is not set #50

Closed leahneukirchen closed 1 year ago

leahneukirchen commented 1 year ago

The code in get_default_config_path assumes $HOME is set when $XDG_CONFIG_HOME is not set. This may not be the case when mpdscribble is launched as root from a service supervisor.

https://github.com/MusicPlayerDaemon/mpdscribble/blob/master/src/ReadConfig.cxx#L69

% (unset HOME; mpdscribble; echo $? ) 
basic_string::_M_construct null not valid
1