From e6a87e15043767c0f1f00a62110e4bbb53de4ece Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Fri, 24 Feb 2012 11:18:58 +0100 Subject: Don’t use custom format output as format string MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It may contain %’s and crashes. Closes #225. --- src/ui.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ui.c b/src/ui.c index f67d3a6..acba151 100644 --- a/src/ui.c +++ b/src/ui.c @@ -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; -- cgit v1.2.3