Gentoo Archives: gentoo-commits

From: Alfredo Tupone <tupone@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-server/crossfire-server/files/, games-server/crossfire-server/
Date: Tue, 15 Dec 2015 20:47:26
Message-Id: 1450212403.0ef2a66801ebe2b01265d26c5d9d497bf6277dd5.tupone@gentoo
1 commit: 0ef2a66801ebe2b01265d26c5d9d497bf6277dd5
2 Author: Tupone Alfredo <tupone <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 15 20:46:09 2015 +0000
4 Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 15 20:46:43 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ef2a668
7
8 games-server/crossfire-server: Fix format security. Bug #544352
9
10 Package-Manager: portage-2.2.24
11
12 .../crossfire-server/crossfire-server-1.71.0.ebuild | 1 +
13 .../files/crossfire-server-1.71.0-format.patch | 20 ++++++++++++++++++++
14 2 files changed, 21 insertions(+)
15
16 diff --git a/games-server/crossfire-server/crossfire-server-1.71.0.ebuild b/games-server/crossfire-server/crossfire-server-1.71.0.ebuild
17 index e0c1918..06055ec 100644
18 --- a/games-server/crossfire-server/crossfire-server-1.71.0.ebuild
19 +++ b/games-server/crossfire-server/crossfire-server-1.71.0.ebuild
20 @@ -28,6 +28,7 @@ RDEPEND=${DEPEND}
21 src_prepare() {
22 rm -f "${WORKDIR}"/maps/Info/combine.pl # bug #236205
23 ln -s "${WORKDIR}/arch" "${S}/lib" || die
24 + epatch "${FILESDIR}"/${P}-format.patch
25 }
26
27 src_configure() {
28
29 diff --git a/games-server/crossfire-server/files/crossfire-server-1.71.0-format.patch b/games-server/crossfire-server/files/crossfire-server-1.71.0-format.patch
30 new file mode 100644
31 index 0000000..174b785
32 --- /dev/null
33 +++ b/games-server/crossfire-server/files/crossfire-server-1.71.0-format.patch
34 @@ -0,0 +1,20 @@
35 +--- server/c_chat.c.old 2015-12-15 21:35:30.024866220 +0100
36 ++++ server/c_chat.c 2015-12-15 21:36:58.479266312 +0100
37 +@@ -483,7 +483,7 @@
38 + { "You spit over your left shoulder.", "%s spits over his left shoulder." },
39 + { "Strut your stuff.", "%s struts proudly." },
40 + { NULL, NULL },
41 +- { "%s patiently twiddles his thumbs.", "You patiently twiddle your thumbs." },
42 ++ { "You patiently twiddle your thumbs.", "%s patiently twiddles his thumbs." },
43 + { "You wave.", "%s waves happily." },
44 + { "You whistle appreciatively.", "%s whistles appreciatively." },
45 + { "Have you got something in your eye?", "%s winks suggestively." },
46 +@@ -645,7 +645,7 @@
47 +
48 + if (*params == '\0') {
49 + if (emotion > EMOTE_FIRST && emotion < EMOTE_LAST && single_emotes[emotion - 1][0] != NULL) {
50 +- snprintf(buf, sizeof(buf), single_emotes[emotion - 1][0]);
51 ++ snprintf(buf, sizeof(buf), "%s", single_emotes[emotion - 1][0]);
52 + snprintf(buf2, sizeof(buf2), single_emotes[emotion - 1][1], op->name);
53 + } else {
54 + snprintf(buf, sizeof(buf), "You are a nut.");