summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2016-09-26 00:22:40 +0200
committerDavid Seifert <soap@gentoo.org>2016-09-26 00:23:23 +0200
commit7903e76836b83a49ddac62b9bc9c4aaa1238fbe2 (patch)
tree92f638505c0ddae8b388f4b0564b28fc68a598d1 /sci-libs/galib/files/galib-2.4.7-Wformat-security.patch
parentsci-astronomy/astrometry: add missing dependency on astropy (diff)
downloadgentoo-7903e76836b83a49ddac62b9bc9c4aaa1238fbe2.tar.gz
gentoo-7903e76836b83a49ddac62b9bc9c4aaa1238fbe2.tar.bz2
gentoo-7903e76836b83a49ddac62b9bc9c4aaa1238fbe2.zip
sci-libs/galib: Allow for compiling with GCC 6
Gentoo-bug: 594504 * Patch by Peter Levine * EAPI=6 * [QA] Fix -Wformat-security errors * Fix build system to honour CXX, AR, RANLIB properly Package-Manager: portage-2.3.1
Diffstat (limited to 'sci-libs/galib/files/galib-2.4.7-Wformat-security.patch')
-rw-r--r--sci-libs/galib/files/galib-2.4.7-Wformat-security.patch79
1 files changed, 79 insertions, 0 deletions
diff --git a/sci-libs/galib/files/galib-2.4.7-Wformat-security.patch b/sci-libs/galib/files/galib-2.4.7-Wformat-security.patch
new file mode 100644
index 00000000000..faa7dcff446
--- /dev/null
+++ b/sci-libs/galib/files/galib-2.4.7-Wformat-security.patch
@@ -0,0 +1,79 @@
+Fix -Wformat-security issues, as we do not want to install potentially
+dangerous example C++ files on user systems:
+* ex18.C: In function ‘int main(int, char**)’:
+* ex18.C:92:27: warning: format not a string literal and no format arguments [-Wformat-security]
+* sprintf(filename, argv[i]);
+
+--- a/examples/ex18.C
++++ b/examples/ex18.C
+@@ -89,7 +89,7 @@
+ exit(1);
+ }
+ else{
+- sprintf(filename, argv[i]);
++ sprintf(filename, "%s", argv[i]);
+ continue;
+ }
+ }
+--- a/examples/ex3.C
++++ b/examples/ex3.C
+@@ -71,7 +71,7 @@
+ exit(1);
+ }
+ else{
+- sprintf(filename, argv[i]);
++ sprintf(filename, "%s", argv[i]);
+ continue;
+ }
+ }
+--- a/examples/ex5.C
++++ b/examples/ex5.C
+@@ -308,7 +308,7 @@
+ exit(1);
+ }
+ else{
+- sprintf(filename1, argv[i]);
++ sprintf(filename1, "%s", argv[i]);
+ continue;
+ }
+ }
+@@ -318,7 +318,7 @@
+ exit(1);
+ }
+ else{
+- sprintf(filename2, argv[i]);
++ sprintf(filename2, "%s", argv[i]);
+ continue;
+ }
+ }
+--- a/examples/ex7.C
++++ b/examples/ex7.C
+@@ -68,7 +68,7 @@
+ exit(1);
+ }
+ else{
+- sprintf(datafile, argv[i]);
++ sprintf(datafile, "%s", argv[i]);
+ continue;
+ }
+ }
+@@ -78,7 +78,7 @@
+ exit(1);
+ }
+ else{
+- sprintf(parmfile, argv[i]);
++ sprintf(parmfile, "%s", argv[i]);
+ params.read(parmfile);
+ continue;
+ }
+--- a/ga/gaerror.C
++++ b/ga/gaerror.C
+@@ -21,7 +21,7 @@
+ static STD_OSTREAM *__gaErrStream = & STD_CERR;
+ #endif
+ static GABoolean __gaErrFlag = gaTrue;
+-static char *__gaErrStr[] = {
++static const char *__gaErrStr[] = {
+ "error reading from file: ",
+ "error writing to file: ",
+ "unexpected EOF encountered during read.",