diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2012-02-24 11:18:58 +0100 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2012-02-24 11:18:58 +0100 |
commit | e6a87e15043767c0f1f00a62110e4bbb53de4ece (patch) | |
tree | 4fd37e66a7b17aced0dd8b81d77cddb0a5d02b16 | |
parent | b61291f4bd51e3d9e30504c16de743decd54f2d9 (diff) | |
download | pianobar-windows-e6a87e15043767c0f1f00a62110e4bbb53de4ece.tar.gz pianobar-windows-e6a87e15043767c0f1f00a62110e4bbb53de4ece.tar.bz2 pianobar-windows-e6a87e15043767c0f1f00a62110e4bbb53de4ece.zip |
Don’t use custom format output as format string
It may contain %’s and crashes. Closes #225.
-rw-r--r-- | src/ui.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -709,7 +709,7 @@ inline void BarUiPrintStation (const BarSettings_t *settings, BarUiCustomFormat (outstr, sizeof (outstr), settings->npStationFormat, "ni", vals); BarUiAppendNewline (outstr, sizeof (outstr)); - BarUiMsg (settings, MSG_PLAYING, outstr); + BarUiMsg (settings, MSG_PLAYING, "%s", outstr); } /* Print song infos (artist, title, album, loved) @@ -729,7 +729,7 @@ inline void BarUiPrintSong (const BarSettings_t *settings, BarUiCustomFormat (outstr, sizeof (outstr), settings->npSongFormat, "talr@su", vals); BarUiAppendNewline (outstr, sizeof (outstr)); - BarUiMsg (settings, MSG_PLAYING, outstr); + BarUiMsg (settings, MSG_PLAYING, "%s", outstr); } /* Print list of songs @@ -756,7 +756,7 @@ size_t BarUiListSongs (const BarSettings_t *settings, BarUiCustomFormat (outstr, sizeof (outstr), settings->listSongFormat, "iatr", vals); BarUiAppendNewline (outstr, sizeof (outstr)); - BarUiMsg (settings, MSG_LIST, outstr); + BarUiMsg (settings, MSG_LIST, "%s", outstr); } i++; song = song->next; |