summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2012-02-24 11:18:58 +0100
committerLars-Dominik Braun <lars@6xq.net>2012-02-24 11:18:58 +0100
commite6a87e15043767c0f1f00a62110e4bbb53de4ece (patch)
tree4fd37e66a7b17aced0dd8b81d77cddb0a5d02b16
parentb61291f4bd51e3d9e30504c16de743decd54f2d9 (diff)
downloadpianobar-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.c6
1 files changed, 3 insertions, 3 deletions
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;