games-board/maitretarot: format-security. Bug #543016
authorTupone Alfredo <tupone@gentoo.org>
Wed, 16 Dec 2015 21:06:18 +0000 (22:06 +0100)
committerTupone Alfredo <tupone@gentoo.org>
Wed, 16 Dec 2015 21:06:18 +0000 (22:06 +0100)
Package-Manager: portage-2.2.24

games-board/maitretarot/files/maitretarot-0.1.98-format.patch [new file with mode: 0644]
games-board/maitretarot/maitretarot-0.1.98.ebuild

diff --git a/games-board/maitretarot/files/maitretarot-0.1.98-format.patch b/games-board/maitretarot/files/maitretarot-0.1.98-format.patch
new file mode 100644 (file)
index 0000000..b3ff1fe
--- /dev/null
@@ -0,0 +1,11 @@
+--- src/game.c.old     2015-12-16 21:59:49.400430743 +0100
++++ src/game.c 2015-12-16 21:59:11.085058332 +0100
+@@ -642,7 +642,7 @@
+                 (game, prev_winner, c, ((i + prev_winner) % 4),
+                  game->players[((i + prev_winner) % 4)]->turn, &err))
+               {
+-                g_message (err->message);
++                g_message ("%s", err->message);
+                 turn_nok = TRUE;
+                 game->players[((i + prev_winner) % 4)]->ready =
+                   MT_PLAYER_READY_SEND_NOK_FOR_CARD;
index 631fc95ea9bb87f6323ac8a1ba3296fa846ae6ac..fb65203408be4c0dc966bfb466a59dce9a6b754d 100644 (file)
@@ -3,7 +3,7 @@
 # $Id$
 
 EAPI=5
-inherit games
+inherit games eutils
 
 DESCRIPTION="server for the french tarot game maitretarot"
 HOMEPAGE="http://www.nongnu.org/maitretarot/"
@@ -19,6 +19,10 @@ DEPEND="dev-libs/glib:2
        dev-games/libmaitretarot"
 RDEPEND=${DEPEND}
 
+src_prepare() {
+       epatch "${FILESDIR}"/${P}-format.patch
+}
+
 src_configure() {
        egamesconf \
                --with-default-config-file="${GAMES_SYSCONFDIR}/maitretarotrc.xml"