games-sports/torcs: compile with format-security. Bug #539232
authorTupone Alfredo <tupone@gentoo.org>
Wed, 23 Dec 2015 20:11:37 +0000 (21:11 +0100)
committerTupone Alfredo <tupone@gentoo.org>
Wed, 23 Dec 2015 20:12:13 +0000 (21:12 +0100)
Package-Manager: portage-2.2.24

games-sports/torcs/files/torcs-1.3.6-format.patch [new file with mode: 0644]
games-sports/torcs/torcs-1.3.6.ebuild

diff --git a/games-sports/torcs/files/torcs-1.3.6-format.patch b/games-sports/torcs/files/torcs-1.3.6-format.patch
new file mode 100644 (file)
index 0000000..52e7db6
--- /dev/null
@@ -0,0 +1,34 @@
+--- src/tools/texmapper/maintexmapper.cpp.old  2015-12-23 20:55:24.874102363 +0100
++++ src/tools/texmapper/maintexmapper.cpp      2015-12-23 20:55:55.071553325 +0100
+@@ -103,7 +103,7 @@
+ {
+     int               i, j;
+ 
+-    printf(title);
++    printf("%s", title);
+     for (j = 0; j < 4; j ++){
+       for (i = 0; i < 4; i ++) {
+           printf("%.6f  ", m[i][j]);
+--- src/tools/trackgen/objects.cpp.old 2015-12-23 20:59:49.671287196 +0100
++++ src/tools/trackgen/objects.cpp     2015-12-23 21:02:21.639523189 +0100
+@@ -234,9 +234,9 @@
+ \r
+       ssgLeaf *vt = (ssgLeaf *)ent;\r
+       if (vt->getCullFace() == TRUE) {\r
+-              surf = "SURF 0x10\n";\r
++              surf = "0x10";\r
+       } else {\r
+-              surf = "SURF 0x30\n";\r
++              surf = "0x30";\r
+       }\r
+ \r
+       int num_verts = vt->getNumVertices();\r
+@@ -304,7 +304,7 @@
+       fprintf (save_fd, "numsurf %d\n", num_tris);\r
+ \r
+       for (i = 0; i < num_tris; i++) {\r
+-              fprintf (save_fd, surf);\r
++              fprintf (save_fd, "SURF %s\n", surf);\r
+               fprintf (save_fd, "mat 0\n");\r
+               fprintf (save_fd, "refs 3\n");\r
+               fprintf (save_fd, "%d %g %g\n",\r
index 4c01238e2991a5dacd0e93ea64e87bbcb7c8eaf0..fdd634c3ab45b68080050f47dc5ca0014fd86772 100644 (file)
@@ -33,6 +33,7 @@ src_prepare() {
                "${FILESDIR}"/${P}-no-automake.patch \
                "${FILESDIR}"/${P}-as-needed.patch \
                "${FILESDIR}"/${P}-flags.patch \
+               "${FILESDIR}"/${P}-format.patch \
                "${FILESDIR}"/${P}-noXmuXt.patch
        eautoreconf
        ecvs_clean