MusicPlayerDaemon / mpc

Command-line client for MPD
GNU General Public License v2.0
191 stars 36 forks source link

Fix mpc status '' #81

Closed shirenn closed 2 years ago

shirenn commented 2 years ago

Currently when calling mpc status with a empty string argument, the format_object2 returns a NULL string, which leads to a segmentation fault when the status gets printed. The implemented fix adds a check before printing the returned status from format_song. Other callings of format_object2 seem to not be affected by this behaviour.

Signed-off-by: shirenn shirenn@crans.org