summaryrefslogtreecommitdiff
path: root/sci-astronomy/funtools/files/funtools-1.4.4-fix-hardening.patch
diff options
context:
space:
mode:
Diffstat (limited to 'sci-astronomy/funtools/files/funtools-1.4.4-fix-hardening.patch')
-rw-r--r--sci-astronomy/funtools/files/funtools-1.4.4-fix-hardening.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/sci-astronomy/funtools/files/funtools-1.4.4-fix-hardening.patch b/sci-astronomy/funtools/files/funtools-1.4.4-fix-hardening.patch
new file mode 100644
index 0000000000..2f24268d74
--- /dev/null
+++ b/sci-astronomy/funtools/files/funtools-1.4.4-fix-hardening.patch
@@ -0,0 +1,68 @@
+Author: Ole Streicher <debian@liska.ath.cx>
+Description: Fix the format string for fprintf
+--- a/gnu/sort.c
++++ b/gnu/sort.c
+@@ -2775,7 +2775,7 @@
+ xfwrite (buf, 1, cc, ofp);
+ if (ferror (fp))
+ {
+- fprintf (stderr, files[i]);
++ fprintf (stderr, "%s", files[i]);
+ cleanup ();
+ exit (2);
+ }
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -137,7 +137,7 @@
+
+ CC = @CC@
+
+-CC_SWITCHES = -I. ${CFLAGS} @USE_DL@ ${INCLUDES} ${AC_FLAGS}
++CC_SWITCHES = -I. ${CFLAGS} ${CPPFLAGS} @USE_DL@ ${INCLUDES} ${AC_FLAGS}
+
+ DEPEND_SWITCHES = -I. ${CFLAGS} ${INCLUDES} ${AC_FLAGS}
+
+--- a/filter/Makefile.in
++++ b/filter/Makefile.in
+@@ -114,7 +114,7 @@
+
+ CC = @CC@
+
+-CC_SWITCHES = -I. ${CFLAGS} -DFILT_VERSION="\"$(VERSION)\"" @USE_DL@ \
++CC_SWITCHES = -I. ${CFLAGS} ${CPPFLAGS} -DFILT_VERSION="\"$(VERSION)\"" @USE_DL@ \
+ ${INCLUDES} ${AC_FLAGS}
+
+ DEPEND_SWITCHES = -I. ${CFLAGS} -I. ${INCLUDES} ${AC_FLAGS}
+--- a/gnu/Makefile.in
++++ b/gnu/Makefile.in
+@@ -87,7 +87,7 @@
+
+ CC = @CC@
+
+-CC_SWITCHES = ${CFLAGS} ${INCLUDES} ${AC_FLAGS}
++CC_SWITCHES = ${CFLAGS} ${CPPFLAGS} ${INCLUDES} ${AC_FLAGS}
+
+ DEPEND_SWITCHES = ${CFLAGS} ${INCLUDES} ${AC_FLAGS}
+
+--- a/util/Makefile.in
++++ b/util/Makefile.in
+@@ -105,7 +105,7 @@
+
+ CC = @CC@
+
+-CC_SWITCHES = -I. ${CFLAGS} @USE_DL@ ${INCLUDES} ${AC_FLAGS}
++CC_SWITCHES = -I. ${CFLAGS} ${CPPFLAGS} @USE_DL@ ${INCLUDES} ${AC_FLAGS}
+
+ DEPEND_SWITCHES = -I. ${CFLAGS} ${INCLUDES} ${AC_FLAGS}
+
+--- a/mklib
++++ b/mklib
+@@ -169,7 +169,7 @@
+ rm -f ${LIBNAME}.so
+
+ # make lib
+- ${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
++ ${LINK} ${LDFLAGS} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
+ # make usual symlinks
+ ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR}
+ ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so