summaryrefslogtreecommitdiffstats
path: root/meta-multimedia/recipes-multimedia/vorbis-tools/vorbis-tools/0004-Fix-format-error-blocking-compilation-with-hardening.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-multimedia/recipes-multimedia/vorbis-tools/vorbis-tools/0004-Fix-format-error-blocking-compilation-with-hardening.patch')
-rw-r--r--meta-multimedia/recipes-multimedia/vorbis-tools/vorbis-tools/0004-Fix-format-error-blocking-compilation-with-hardening.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/meta-multimedia/recipes-multimedia/vorbis-tools/vorbis-tools/0004-Fix-format-error-blocking-compilation-with-hardening.patch b/meta-multimedia/recipes-multimedia/vorbis-tools/vorbis-tools/0004-Fix-format-error-blocking-compilation-with-hardening.patch
new file mode 100644
index 000000000..111e98ac1
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/vorbis-tools/vorbis-tools/0004-Fix-format-error-blocking-compilation-with-hardening.patch
@@ -0,0 +1,26 @@
1From: 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);