games-strategy/s25rttr: compile with format-security. Bug #540636
authorTupone Alfredo <tupone@gentoo.org>
Tue, 16 Feb 2016 06:46:25 +0000 (07:46 +0100)
committerTupone Alfredo <tupone@gentoo.org>
Tue, 16 Feb 2016 06:47:00 +0000 (07:47 +0100)
Package-Manager: portage-2.2.26

games-strategy/s25rttr/files/s25rttr-0.8.1-format.patch [new file with mode: 0644]
games-strategy/s25rttr/s25rttr-0.8.1-r1.ebuild

diff --git a/games-strategy/s25rttr/files/s25rttr-0.8.1-format.patch b/games-strategy/s25rttr/files/s25rttr-0.8.1-format.patch
new file mode 100644 (file)
index 0000000..588a755
--- /dev/null
@@ -0,0 +1,11 @@
+--- src/dskGameInterface.cpp.old       2016-02-15 21:11:58.308899794 +0100
++++ src/dskGameInterface.cpp   2016-02-15 21:12:24.564433584 +0100
+@@ -1349,7 +1349,7 @@
+                       snprintf(text, sizeof(text), _("Team victory! '%s' and '%s' and '%s' and '%s' are the winners!"), GameClient::inst().GetPlayer(winners[0])->name.c_str(),GameClient::inst().GetPlayer(winners[1])->name.c_str(),GameClient::inst().GetPlayer(winners[2])->name.c_str(),GameClient::inst().GetPlayer(winners[3])->name.c_str());
+                       break;
+               default:
+-                      snprintf(text, sizeof(text), _("Team victory!"));
++                      snprintf(text, sizeof(text), "%s", _("Team victory!"));
+                       break;
+       }
+       messenger.AddMessage("", 0, CD_SYSTEM, text, COLOR_ORANGE);
index 46d23651c901902d18cdb0bd0f6afd8f6bc19d25..15d30987c1a469645707b2789427462a930c0004 100644 (file)
@@ -32,6 +32,7 @@ src_prepare() {
        epatch "${FILESDIR}"/${P}-cmake.patch \
                "${FILESDIR}"/${P}-soundconverter.patch \
                "${FILESDIR}"/${P}-fpic.patch \
+               "${FILESDIR}"/${P}-format.patch \
                "${FILESDIR}"/${P}-miniupnpc-api-14.patch
 }