summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkinori Hattori <hattya@gentoo.org>2017-07-08 18:55:29 +0900
committerAkinori Hattori <hattya@gentoo.org>2017-07-08 18:56:35 +0900
commitf810c9a1e1ea2b5dfe545d3d3b044409bb29487f (patch)
tree8787846a5e40b3db363c1794ac29b23fe8da305f
parentapp-editors/ee: update to EAPI 6 (diff)
downloadgentoo-f810c9a1e1ea2b5dfe545d3d3b044409bb29487f.tar.gz
gentoo-f810c9a1e1ea2b5dfe545d3d3b044409bb29487f.tar.bz2
gentoo-f810c9a1e1ea2b5dfe545d3d3b044409bb29487f.zip
app-editors/ee: fix build with -Werror=format-security
Gentoo-Bug: 520518 Package-Manager: Portage-2.3.6, Repoman-2.3.1
-rw-r--r--app-editors/ee/ee-1.5.2.ebuild5
-rw-r--r--app-editors/ee/files/ee-Wformat-security.patch28
2 files changed, 32 insertions, 1 deletions
diff --git a/app-editors/ee/ee-1.5.2.ebuild b/app-editors/ee/ee-1.5.2.ebuild
index 250c1e87c8a..0d343a67d9e 100644
--- a/app-editors/ee/ee-1.5.2.ebuild
+++ b/app-editors/ee/ee-1.5.2.ebuild
@@ -18,7 +18,10 @@ IUSE=""
RDEPEND="!app-editors/ersatz-emacs"
S="${WORKDIR}/easyedit-${PV}"
-PATCHES=( "${FILESDIR}"/${PN}-init-location.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-init-location.patch
+ "${FILESDIR}"/${PN}-Wformat-security.patch
+)
DOCS=( Changes README.${PN} ${PN}.i18n.guide ${PN}.msg )
src_prepare() {
diff --git a/app-editors/ee/files/ee-Wformat-security.patch b/app-editors/ee/files/ee-Wformat-security.patch
new file mode 100644
index 00000000000..6db64188347
--- /dev/null
+++ b/app-editors/ee/files/ee-Wformat-security.patch
@@ -0,0 +1,28 @@
+--- a/ee.c
++++ b/ee.c
+@@ -2105,11 +2105,11 @@
+ }
+ else if (!strcmp("-?", buff))
+ {
+- fprintf(stderr, usage0, arguments[0]);
+- fprintf(stderr, usage1);
+- fprintf(stderr, usage2);
+- fprintf(stderr, usage3);
+- fprintf(stderr, usage4);
++ fprintf(stderr, "%s", usage0, arguments[0]);
++ fprintf(stderr, "%s", usage1);
++ fprintf(stderr, "%s", usage2);
++ fprintf(stderr, "%s", usage3);
++ fprintf(stderr, "%s", usage4);
+ exit(1);
+ }
+ else if ((*buff == '+') && (start_at_line == NULL))
+@@ -3243,7 +3243,7 @@
+ }
+ if (shell_fork)
+ {
+- printf(continue_msg);
++ printf("%s", continue_msg);
+ fflush(stdout);
+ while ((in = getchar()) != '\n')
+ ;