1 |
commit: c88993e713f214c28fb151d8fb05a1425cc13ce5 |
2 |
Author: Akinori Hattori <hattya <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jul 8 08:54:52 2017 +0000 |
4 |
Commit: Akinori Hattori <hattya <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 8 09:13:45 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c88993e7 |
7 |
|
8 |
app-i18n/canna: fix build with -Werror=format-security |
9 |
|
10 |
Gentoo-Bug: 521054 |
11 |
|
12 |
Package-Manager: Portage-2.3.6, Repoman-2.3.1 |
13 |
|
14 |
app-i18n/canna/canna-3.7_p3-r1.ebuild | 1 + |
15 |
app-i18n/canna/canna-3.7_p3-r2.ebuild | 1 + |
16 |
app-i18n/canna/canna-3.7_p3-r3.ebuild | 1 + |
17 |
app-i18n/canna/files/canna-Wformat-security.patch | 199 ++++++++++++++++++++++ |
18 |
4 files changed, 202 insertions(+) |
19 |
|
20 |
diff --git a/app-i18n/canna/canna-3.7_p3-r1.ebuild b/app-i18n/canna/canna-3.7_p3-r1.ebuild |
21 |
index 97dee1123ab..6a04c297b98 100644 |
22 |
--- a/app-i18n/canna/canna-3.7_p3-r1.ebuild |
23 |
+++ b/app-i18n/canna/canna-3.7_p3-r1.ebuild |
24 |
@@ -26,6 +26,7 @@ PATCHES=( |
25 |
"${FILESDIR}"/${PN}-kpdef.patch |
26 |
"${FILESDIR}"/${PN}-posix-sort.patch |
27 |
"${FILESDIR}"/${PN}-Wformat.patch |
28 |
+ "${FILESDIR}"/${PN}-Wformat-security.patch |
29 |
) |
30 |
DOCS="*CHANGES* ChangeLog INSTALL* README* RKCCONF* WHATIS*" |
31 |
|
32 |
|
33 |
diff --git a/app-i18n/canna/canna-3.7_p3-r2.ebuild b/app-i18n/canna/canna-3.7_p3-r2.ebuild |
34 |
index 2236655f622..f6c43bc73d8 100644 |
35 |
--- a/app-i18n/canna/canna-3.7_p3-r2.ebuild |
36 |
+++ b/app-i18n/canna/canna-3.7_p3-r2.ebuild |
37 |
@@ -31,6 +31,7 @@ PATCHES=( |
38 |
"${FILESDIR}"/${PN}-kpdef.patch |
39 |
"${FILESDIR}"/${PN}-posix-sort.patch |
40 |
"${FILESDIR}"/${PN}-Wformat.patch |
41 |
+ "${FILESDIR}"/${PN}-Wformat-security.patch |
42 |
) |
43 |
DOCS="*CHANGES* ChangeLog INSTALL* README* RKCCONF* WHATIS*" |
44 |
|
45 |
|
46 |
diff --git a/app-i18n/canna/canna-3.7_p3-r3.ebuild b/app-i18n/canna/canna-3.7_p3-r3.ebuild |
47 |
index d794f10e8ed..bb324c8e8ea 100644 |
48 |
--- a/app-i18n/canna/canna-3.7_p3-r3.ebuild |
49 |
+++ b/app-i18n/canna/canna-3.7_p3-r3.ebuild |
50 |
@@ -37,6 +37,7 @@ PATCHES=( |
51 |
"${FILESDIR}"/${PN}-kpdef.patch |
52 |
"${FILESDIR}"/${PN}-posix-sort.patch |
53 |
"${FILESDIR}"/${PN}-Wformat.patch |
54 |
+ "${FILESDIR}"/${PN}-Wformat-security.patch |
55 |
) |
56 |
DOCS="*CHANGES* ChangeLog INSTALL* README* RKCCONF* WHATIS*" |
57 |
|
58 |
|
59 |
diff --git a/app-i18n/canna/files/canna-Wformat-security.patch b/app-i18n/canna/files/canna-Wformat-security.patch |
60 |
new file mode 100644 |
61 |
index 00000000000..c83552b5cba |
62 |
--- /dev/null |
63 |
+++ b/app-i18n/canna/files/canna-Wformat-security.patch |
64 |
@@ -0,0 +1,199 @@ |
65 |
+--- a/cmd/catdic/can.c |
66 |
++++ b/cmd/catdic/can.c |
67 |
+@@ -1236,7 +1236,7 @@ |
68 |
+ break; |
69 |
+ default: |
70 |
+ if (init[0] == '/') { |
71 |
+- (void)fprintf(stderr,msg_abnl); |
72 |
++ (void)fprintf(stderr,"%s",msg_abnl); |
73 |
+ } else { |
74 |
+ (void)fprintf(stderr,msg_abnls,init); |
75 |
+ } |
76 |
+@@ -1297,11 +1297,11 @@ |
77 |
+ |
78 |
+ if ( opt_fq ) { |
79 |
+ if ( opt_s ) { |
80 |
+- (void) fprintf(stderr,msg_sfq); |
81 |
++ (void) fprintf(stderr,"%s",msg_sfq); |
82 |
+ exit(ERR_VALUE) ; |
83 |
+ } |
84 |
+ if ( opt_l || opt_std ) { |
85 |
+- (void) fprintf(stderr,msg_l); |
86 |
++ (void) fprintf(stderr,"%s",msg_l); |
87 |
+ exit(ERR_VALUE) ; |
88 |
+ } |
89 |
+ mode = mode | PL_DIC ; |
90 |
+@@ -1491,7 +1491,7 @@ |
91 |
+ break; |
92 |
+ default: |
93 |
+ if(init[0] == '/') { |
94 |
+- fprintf(stderr,msg_abnl ); |
95 |
++ fprintf(stderr,"%s",msg_abnl ); |
96 |
+ } |
97 |
+ else { |
98 |
+ fprintf(stderr,msg_abnls,init); |
99 |
+--- a/cmd/catdic/rutil.c |
100 |
++++ b/cmd/catdic/rutil.c |
101 |
+@@ -271,7 +271,7 @@ |
102 |
+ "Dictionary \"%s\" does not exist.\n"), dicname); |
103 |
+ break; |
104 |
+ case NOTALC : |
105 |
+- (void)fprintf(stderr, msg_mem); |
106 |
++ (void)fprintf(stderr, "%s", msg_mem); |
107 |
+ break; |
108 |
+ case BADF : |
109 |
+ (void)fprintf(stderr, gettxt("cannacmd:196", |
110 |
+@@ -297,7 +297,7 @@ |
111 |
+ (void)fprintf(stderr,msg_abnls,init); |
112 |
+ } |
113 |
+ else { |
114 |
+- (void)fprintf(stderr,msg_abnl); |
115 |
++ (void)fprintf(stderr,"%s",msg_abnl); |
116 |
+ } |
117 |
+ break; |
118 |
+ } |
119 |
+@@ -321,7 +321,7 @@ |
120 |
+ (void)fprintf(stderr, msg_abnls, init); |
121 |
+ } |
122 |
+ else { |
123 |
+- (void)fprintf(stderr, msg_abnl); |
124 |
++ (void)fprintf(stderr, "%s", msg_abnl); |
125 |
+ } |
126 |
+ ret = -1; |
127 |
+ return ret; |
128 |
+@@ -332,13 +332,13 @@ |
129 |
+ (void)fprintf(stderr, msg_mnts, init); |
130 |
+ } |
131 |
+ else { |
132 |
+- (void)fprintf(stderr, msg_mnt); |
133 |
++ (void)fprintf(stderr, "%s", msg_mnt); |
134 |
+ } |
135 |
+ ret = -1; |
136 |
+ return ret; |
137 |
+ } |
138 |
+ if ((mode & PL_DIC) == PL_DIC ) { |
139 |
+- (void)fprintf(stderr,msg_fq); |
140 |
++ (void)fprintf(stderr,"%s",msg_fq); |
141 |
+ ret = -1 ; |
142 |
+ return ret ; |
143 |
+ } |
144 |
+@@ -359,7 +359,7 @@ |
145 |
+ ret = 0; |
146 |
+ break; |
147 |
+ case NOTALC : |
148 |
+- (void)fprintf(stderr, msg_mem); |
149 |
++ (void)fprintf(stderr, "%s", msg_mem); |
150 |
+ ret = -1; |
151 |
+ break; |
152 |
+ case BADF : |
153 |
+@@ -421,7 +421,7 @@ |
154 |
+ ret = -1; |
155 |
+ break; |
156 |
+ case BADCONT : |
157 |
+- (void)fprintf(stderr,msg_cnt); |
158 |
++ (void)fprintf(stderr,"%s",msg_cnt); |
159 |
+ ret = -1; |
160 |
+ break; |
161 |
+ default: |
162 |
+@@ -429,7 +429,7 @@ |
163 |
+ (void)fprintf(stderr, msg_abnls, init); |
164 |
+ } |
165 |
+ else { |
166 |
+- (void)fprintf(stderr, msg_abnl); |
167 |
++ (void)fprintf(stderr, "%s", msg_abnl); |
168 |
+ } |
169 |
+ exit(ERR_VALUE); |
170 |
+ break; |
171 |
+@@ -448,7 +448,7 @@ |
172 |
+ ret = 0; |
173 |
+ break; |
174 |
+ case NOTALC : |
175 |
+- (void)fprintf(stderr, msg_mem); |
176 |
++ (void)fprintf(stderr, "%s", msg_mem); |
177 |
+ ret = -1; |
178 |
+ break; |
179 |
+ case BADF : |
180 |
+@@ -509,11 +509,11 @@ |
181 |
+ ret = -1; |
182 |
+ break; |
183 |
+ case BADARG : |
184 |
+- (void)fprintf(stderr,msg_fq); |
185 |
++ (void)fprintf(stderr,"%s",msg_fq); |
186 |
+ ret = -1; |
187 |
+ break; |
188 |
+ case BADCONT : |
189 |
+- (void)fprintf(stderr,msg_cnt); |
190 |
++ (void)fprintf(stderr,"%s",msg_cnt); |
191 |
+ ret = -1; |
192 |
+ break; |
193 |
+ case NOENT : /* 91.12.03 */ |
194 |
+@@ -526,7 +526,7 @@ |
195 |
+ (void)fprintf(stderr, msg_abnls, init); |
196 |
+ } |
197 |
+ else { |
198 |
+- (void)fprintf(stderr, msg_abnl); |
199 |
++ (void)fprintf(stderr, "%s", msg_abnl); |
200 |
+ } |
201 |
+ exit(ERR_VALUE); |
202 |
+ break; |
203 |
+@@ -556,7 +556,7 @@ |
204 |
+ (void)fprintf(stderr, msg_abnls,init); |
205 |
+ } |
206 |
+ else { |
207 |
+- (void)fprintf(stderr, msg_abnl); |
208 |
++ (void)fprintf(stderr, "%s", msg_abnl); |
209 |
+ } |
210 |
+ ret = -1; |
211 |
+ return ret; |
212 |
+@@ -567,13 +567,13 @@ |
213 |
+ (void)fprintf(stderr, msg_mnts, init); |
214 |
+ } |
215 |
+ else { |
216 |
+- (void)fprintf(stderr, msg_mnt); |
217 |
++ (void)fprintf(stderr, "%s", msg_mnt); |
218 |
+ } |
219 |
+ ret = -1; |
220 |
+ return ret; |
221 |
+ } |
222 |
+ if ((mode & PL_DIC) == PL_DIC ) { |
223 |
+- (void)fprintf(stderr, msg_fq); |
224 |
++ (void)fprintf(stderr, "%s", msg_fq); |
225 |
+ ret = -1 ; |
226 |
+ return ret ; |
227 |
+ } |
228 |
+@@ -608,7 +608,7 @@ |
229 |
+ ret = -2; /* 93.03.03 */ |
230 |
+ break; |
231 |
+ case BADCONT : |
232 |
+- (void)fprintf(stderr, msg_cnt); |
233 |
++ (void)fprintf(stderr, "%s", msg_cnt); |
234 |
+ ret = -1; |
235 |
+ break; |
236 |
+ default: |
237 |
+@@ -616,7 +616,7 @@ |
238 |
+ (void)fprintf(stderr, msg_abnls, init); |
239 |
+ } |
240 |
+ else { |
241 |
+- (void)fprintf(stderr, msg_abnl); |
242 |
++ (void)fprintf(stderr, "%s", msg_abnl); |
243 |
+ } |
244 |
+ ret = -1; |
245 |
+ break; |
246 |
+@@ -651,7 +651,7 @@ |
247 |
+ ret = -2; /* 93.03.03 */ |
248 |
+ break; |
249 |
+ case BADCONT : |
250 |
+- (void)fprintf(stderr, msg_cnt); |
251 |
++ (void)fprintf(stderr, "%s", msg_cnt); |
252 |
+ ret = -1; |
253 |
+ break; |
254 |
+ default: |
255 |
+@@ -659,7 +659,7 @@ |
256 |
+ (void)fprintf(stderr, msg_abnls, init); |
257 |
+ } |
258 |
+ else { |
259 |
+- (void)fprintf(stderr, msg_abnl); |
260 |
++ (void)fprintf(stderr, "%s", msg_abnl); |
261 |
+ } |
262 |
+ ret = -1; |
263 |
+ break; |