From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 1158713888F for ; Tue, 27 Oct 2015 08:36:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 68730E07EA; Tue, 27 Oct 2015 08:36:39 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F1A8BE07EA for ; Tue, 27 Oct 2015 08:36:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D08A1340BBE for ; Tue, 27 Oct 2015 08:36:35 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F329017F7 for ; Tue, 27 Oct 2015 08:36:32 +0000 (UTC) From: "Alfredo Tupone" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alfredo Tupone" Message-ID: <1445934976.179907f70c1e6f5cd12b00e694748daf12eec5e4.tupone@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: games-rpg/twclone/files/, games-rpg/twclone/ X-VCS-Repository: repo/gentoo X-VCS-Files: games-rpg/twclone/files/twclone-0.14-format.patch games-rpg/twclone/twclone-0.14.ebuild X-VCS-Directories: games-rpg/twclone/ games-rpg/twclone/files/ X-VCS-Committer: tupone X-VCS-Committer-Name: Alfredo Tupone X-VCS-Revision: 179907f70c1e6f5cd12b00e694748daf12eec5e4 X-VCS-Branch: master Date: Tue, 27 Oct 2015 08:36:32 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 4fa9e3b5-efb1-4b5f-ad6c-4567f58c862f X-Archives-Hash: 61627b81cbee5c87de0ac2b7a789fa64 commit: 179907f70c1e6f5cd12b00e694748daf12eec5e4 Author: Tupone Alfredo gentoo org> AuthorDate: Tue Oct 27 08:35:31 2015 +0000 Commit: Alfredo Tupone gentoo org> CommitDate: Tue Oct 27 08:36:16 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=179907f7 games-rpg/twclone: Fix compile with format-security. Bug #544364 Package-Manager: portage-2.2.20.1 games-rpg/twclone/files/twclone-0.14-format.patch | 75 +++++++++++++++++++++++ games-rpg/twclone/twclone-0.14.ebuild | 6 +- 2 files changed, 80 insertions(+), 1 deletion(-) diff --git a/games-rpg/twclone/files/twclone-0.14-format.patch b/games-rpg/twclone/files/twclone-0.14-format.patch new file mode 100644 index 0000000..3e51141 --- /dev/null +++ b/games-rpg/twclone/files/twclone-0.14-format.patch @@ -0,0 +1,75 @@ +--- bigbang.c.old 2015-10-27 09:21:51.172611109 +0100 ++++ bigbang.c 2015-10-27 09:25:41.117233447 +0100 +@@ -530,13 +530,11 @@ + planetfile = fopen ("./planets.data", "w"); + for (loop = 1; loop <= 299 - strlen(terraInfo); loop++) + strcat(terraInfo, " "); +- strcat(terraInfo, "\n"); +- fprintf (planetfile, terraInfo); ++ fprintf (planetfile, "%s\n", terraInfo); + sprintf (ferrinfo, "%d:%d:Ferringhi:1:-2:Unknown:1000:1000:1000:0:0:0:0:3:100000:20:30:10:0:0:0:0:", 2, ferringhiSector); + for (loop = 1; loop <= 299 - strlen(ferrinfo); loop++) + strcat(ferrinfo, " "); +- strcat(ferrinfo, "\n"); +- fprintf(planetfile, ferrinfo); ++ fprintf(planetfile, "%s\n", ferrinfo); + randomPlanetInfo = malloc (sizeof (strNameLength)); + if (numRandomPlanets > 0) + { +@@ -552,8 +550,7 @@ + , c, tempint, randomname (randomPlanetInfo), randomnum(1,5)); + for (loop = 1; loop <= 299 - strlen(ferrinfo); loop++) + strcat(ferrinfo, " "); +- strcat(ferrinfo, "\n"); +- fprintf(planetfile, ferrinfo); ++ fprintf(planetfile, "%s\n", ferrinfo); + + c++; + } +@@ -616,10 +613,9 @@ + fileline = strcat (fileline, ":"); + if (sectorlist[x]->nebulae != NULL) + fileline = strcat (fileline, sectorlist[x]->nebulae); +- fileline = strcat (fileline, ":\n"); + /* Later put in whitespace buffer for saving */ + /* Not needed until user created beacons put in */ +- fprintf (file, fileline); ++ fprintf (file, "%s:\n", fileline); + } + fclose (file); + free (fileline); +@@ -646,8 +642,7 @@ + len = (int) strlen (fileline); + for (y = 0; y <= 99 - len; y++) + strcat (fileline, " "); +- strcat (fileline, "\n"); +- fprintf (file, fileline); ++ fprintf (file, "%s\n", fileline); + } + fclose (file); + +--- config.c.old 2015-10-27 09:30:00.091283678 +0100 ++++ config.c 2015-10-27 09:30:25.068806593 +0100 +@@ -140,9 +140,8 @@ + + for (loop=0; loop < 199 - strlen(buffer); loop++) + strcat(buffer, " "); +- strcat(buffer, "\n"); + +- fprintf(configfile, buffer); ++ fprintf(configfile, "%s\n", buffer); + + fclose(configfile); + free(buffer); +--- planet.c.old 2015-10-27 09:31:44.867282757 +0100 ++++ planet.c 2015-10-27 09:32:17.083667674 +0100 +@@ -59,8 +59,7 @@ + addint(stufftosave, planets[index]->citdl->upgradestart, ':', BUFF_SIZE); + for (loop=0; loop< 399 - strlen(stufftosave); loop++) + strcat(stufftosave, " "); +- strcat(stufftosave, "\n"); +- fprintf(planetfile, stufftosave); ++ fprintf(planetfile, "%s\n", stufftosave); + } + } + fclose(planetfile); diff --git a/games-rpg/twclone/twclone-0.14.ebuild b/games-rpg/twclone/twclone-0.14.ebuild index d06e68e..3e92d76 100644 --- a/games-rpg/twclone/twclone-0.14.ebuild +++ b/games-rpg/twclone/twclone-0.14.ebuild @@ -3,7 +3,7 @@ # $Id$ EAPI=5 -inherit games +inherit games eutils MY_P="${PN}-source-${PV}" DESCRIPTION="Clone of BBS Door game Trade Wars 2002" @@ -17,6 +17,10 @@ IUSE="" S=${WORKDIR}/${MY_P} +src_prepare() { + epatch "${FILESDIR}"/${P}-format.patch +} + src_install() { DOCS="AUTHORS ChangeLog PROTOCOL README TODO" \ default