1 |
commit: f810c9a1e1ea2b5dfe545d3d3b044409bb29487f |
2 |
Author: Akinori Hattori <hattya <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jul 8 09:55:29 2017 +0000 |
4 |
Commit: Akinori Hattori <hattya <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jul 8 09:56:35 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f810c9a1 |
7 |
|
8 |
app-editors/ee: fix build with -Werror=format-security |
9 |
|
10 |
Gentoo-Bug: 520518 |
11 |
|
12 |
Package-Manager: Portage-2.3.6, Repoman-2.3.1 |
13 |
|
14 |
app-editors/ee/ee-1.5.2.ebuild | 5 ++++- |
15 |
app-editors/ee/files/ee-Wformat-security.patch | 28 ++++++++++++++++++++++++++ |
16 |
2 files changed, 32 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/app-editors/ee/ee-1.5.2.ebuild b/app-editors/ee/ee-1.5.2.ebuild |
19 |
index 250c1e87c8a..0d343a67d9e 100644 |
20 |
--- a/app-editors/ee/ee-1.5.2.ebuild |
21 |
+++ b/app-editors/ee/ee-1.5.2.ebuild |
22 |
@@ -18,7 +18,10 @@ IUSE="" |
23 |
RDEPEND="!app-editors/ersatz-emacs" |
24 |
S="${WORKDIR}/easyedit-${PV}" |
25 |
|
26 |
-PATCHES=( "${FILESDIR}"/${PN}-init-location.patch ) |
27 |
+PATCHES=( |
28 |
+ "${FILESDIR}"/${PN}-init-location.patch |
29 |
+ "${FILESDIR}"/${PN}-Wformat-security.patch |
30 |
+) |
31 |
DOCS=( Changes README.${PN} ${PN}.i18n.guide ${PN}.msg ) |
32 |
|
33 |
src_prepare() { |
34 |
|
35 |
diff --git a/app-editors/ee/files/ee-Wformat-security.patch b/app-editors/ee/files/ee-Wformat-security.patch |
36 |
new file mode 100644 |
37 |
index 00000000000..6db64188347 |
38 |
--- /dev/null |
39 |
+++ b/app-editors/ee/files/ee-Wformat-security.patch |
40 |
@@ -0,0 +1,28 @@ |
41 |
+--- a/ee.c |
42 |
++++ b/ee.c |
43 |
+@@ -2105,11 +2105,11 @@ |
44 |
+ } |
45 |
+ else if (!strcmp("-?", buff)) |
46 |
+ { |
47 |
+- fprintf(stderr, usage0, arguments[0]); |
48 |
+- fprintf(stderr, usage1); |
49 |
+- fprintf(stderr, usage2); |
50 |
+- fprintf(stderr, usage3); |
51 |
+- fprintf(stderr, usage4); |
52 |
++ fprintf(stderr, "%s", usage0, arguments[0]); |
53 |
++ fprintf(stderr, "%s", usage1); |
54 |
++ fprintf(stderr, "%s", usage2); |
55 |
++ fprintf(stderr, "%s", usage3); |
56 |
++ fprintf(stderr, "%s", usage4); |
57 |
+ exit(1); |
58 |
+ } |
59 |
+ else if ((*buff == '+') && (start_at_line == NULL)) |
60 |
+@@ -3243,7 +3243,7 @@ |
61 |
+ } |
62 |
+ if (shell_fork) |
63 |
+ { |
64 |
+- printf(continue_msg); |
65 |
++ printf("%s", continue_msg); |
66 |
+ fflush(stdout); |
67 |
+ while ((in = getchar()) != '\n') |
68 |
+ ; |