]> git.pld-linux.org Git - packages/flac.git/blame - deb-643377.patch
Fix -Werror=format-security errors. rebased for current tree
[packages/flac.git] / deb-643377.patch
CommitLineData
2f4de17d
ER
1From: Erik de Castro Lopo <erikd@mega-nerd.com>
2Date: Mon, 13 Feb 2012 08:58:08 +0000 (+1100)
3Subject: Fix -Werror=format-security errors.
4X-Git-Url: http://git.xiph.org/?p=flac.git;a=commitdiff_plain;h=a4ffcc0239cbf7384146f0d0e6770e1dbb1b58c4
5
6Fix -Werror=format-security errors.
7
8Fixes "format not a string literal and no format arguments
9 [-Werror=format-security]" errors.
10
11Patch from Fabian Greffrath <fabian+debian@greffrath.com> via Debian.
12Closes Debian bug #643377.
13---
14
15--- flac-1.2.1/src/test_grabbag/cuesheet/main.c~ 2007-02-02 06:26:04.000000000 +0000
16+++ flac-1.2.1/src/test_grabbag/cuesheet/main.c 2012-11-12 22:19:10.859497990 +0000
17@@ -115,12 +115,12 @@
18 const char *usage = "usage: test_cuesheet cuesheet_file lead_out_offset [ cdda ]\n";
19
20 if(argc > 1 && 0 == strcmp(argv[1], "-h")) {
21- printf(usage);
22+ printf("%s", usage);
23 return 0;
24 }
25
26 if(argc < 3 || argc > 4) {
27- fprintf(stderr, usage);
28+ fprintf(stderr, "%s", usage);
29 return 255;
30 }
31
32@@ -129,7 +129,7 @@
33 if(0 == strcmp(argv[3], "cdda"))
34 is_cdda = true;
35 else {
36- fprintf(stderr, usage);
37+ fprintf(stderr, "%s", usage);
38 return 255;
39 }
40 }
41diff --git a/src/test_grabbag/picture/main.c b/src/test_grabbag/picture/main.c
42index b59afd1..a1880ae 100644
43--- a/src/test_grabbag/picture/main.c
44+++ b/src/test_grabbag/picture/main.c
45@@ -211,12 +211,12 @@ int main(int argc, char *argv[])
46 const char *usage = "usage: test_pictures path_prefix\n";
47
48 if(argc > 1 && 0 == strcmp(argv[1], "-h")) {
49- printf(usage);
50+ printf("%s", usage);
51 return 0;
52 }
53
54 if(argc != 2) {
55- fprintf(stderr, usage);
56+ fprintf(stderr, "%s", usage);
57 return 255;
58 }
59
60diff --git a/src/test_seeking/main.c b/src/test_seeking/main.c
61index d1f11d6..589e859 100644
62--- a/src/test_seeking/main.c
63+++ b/src/test_seeking/main.c
64@@ -418,7 +418,7 @@ int main(int argc, char *argv[])
65 static const char * const usage = "usage: test_seeking file.flac [#seeks] [#samples-in-file.flac] [file.raw]\n";
66
67 if (argc < 2 || argc > 5) {
68- fprintf(stderr, usage);
69+ fprintf(stderr, "%s", usage);
70 return 1;
71 }
72
This page took 0.033429 seconds and 4 git commands to generate.