blob: 111e98ac1f0a977a63e42a66c56c113ef75cda53 [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001From: Petter Reinholdtsen <pere@hungry.com>
2Date: Wed, 22 Oct 2014 13:25:21 +0200
3Subject: Fix format error blocking compilation with hardening
4
5Last-Update: 2014-10-22
6Forwarded: no
7
8Enabling hardening refuses to compile code with sprintf() calls
9with no formatting string. Adjust the code to work with hardening.
10---
11 ogg123/status.c | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/ogg123/status.c b/ogg123/status.c
15index 92b8ff1..ccec389 100644
16--- a/ogg123/status.c
17+++ b/ogg123/status.c
18@@ -148,7 +148,7 @@ int print_statistics_line (stat_format_t stats[])
19
20 switch (stats->type) {
21 case stat_noarg:
22- len += sprintf(str+len, stats->formatstr);
23+ len += sprintf(str+len, "%s", stats->formatstr);
24 break;
25 case stat_intarg:
26 len += sprintf(str+len, stats->formatstr, stats->arg.intarg);