commit: 0ef2a66801ebe2b01265d26c5d9d497bf6277dd5 Author: Tupone Alfredo <tupone <AT> gentoo <DOT> org> AuthorDate: Tue Dec 15 20:46:09 2015 +0000 Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org> CommitDate: Tue Dec 15 20:46:43 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ef2a668
games-server/crossfire-server: Fix format security. Bug #544352 Package-Manager: portage-2.2.24 .../crossfire-server/crossfire-server-1.71.0.ebuild | 1 + .../files/crossfire-server-1.71.0-format.patch | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/games-server/crossfire-server/crossfire-server-1.71.0.ebuild b/games-server/crossfire-server/crossfire-server-1.71.0.ebuild index e0c1918..06055ec 100644 --- a/games-server/crossfire-server/crossfire-server-1.71.0.ebuild +++ b/games-server/crossfire-server/crossfire-server-1.71.0.ebuild @@ -28,6 +28,7 @@ RDEPEND=${DEPEND} src_prepare() { rm -f "${WORKDIR}"/maps/Info/combine.pl # bug #236205 ln -s "${WORKDIR}/arch" "${S}/lib" || die + epatch "${FILESDIR}"/${P}-format.patch } src_configure() { 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 new file mode 100644 index 0000000..174b785 --- /dev/null +++ b/games-server/crossfire-server/files/crossfire-server-1.71.0-format.patch @@ -0,0 +1,20 @@ +--- server/c_chat.c.old 2015-12-15 21:35:30.024866220 +0100 ++++ server/c_chat.c 2015-12-15 21:36:58.479266312 +0100 +@@ -483,7 +483,7 @@ + { "You spit over your left shoulder.", "%s spits over his left shoulder." }, + { "Strut your stuff.", "%s struts proudly." }, + { NULL, NULL }, +- { "%s patiently twiddles his thumbs.", "You patiently twiddle your thumbs." }, ++ { "You patiently twiddle your thumbs.", "%s patiently twiddles his thumbs." }, + { "You wave.", "%s waves happily." }, + { "You whistle appreciatively.", "%s whistles appreciatively." }, + { "Have you got something in your eye?", "%s winks suggestively." }, +@@ -645,7 +645,7 @@ + + if (*params == '\0') { + if (emotion > EMOTE_FIRST && emotion < EMOTE_LAST && single_emotes[emotion - 1][0] != NULL) { +- snprintf(buf, sizeof(buf), single_emotes[emotion - 1][0]); ++ snprintf(buf, sizeof(buf), "%s", single_emotes[emotion - 1][0]); + snprintf(buf2, sizeof(buf2), single_emotes[emotion - 1][1], op->name); + } else { + snprintf(buf, sizeof(buf), "You are a nut.");