summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2014-02-23 20:18:40 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2014-02-23 20:18:40 +0000
commit82cb3d1a1dba30ee760a8fbc82bc4a9b3126295a (patch)
treef7bec81aa4ed76b1bebe6bafa0397c6aa52bd545 /sci-astronomy
parenteapi=5; converted to vdr-plugin-2.eclass (diff)
downloadgentoo-2-82cb3d1a1dba30ee760a8fbc82bc4a9b3126295a.tar.gz
gentoo-2-82cb3d1a1dba30ee760a8fbc82bc4a9b3126295a.tar.bz2
gentoo-2-82cb3d1a1dba30ee760a8fbc82bc4a9b3126295a.zip
Add a few fixes from debian
(Portage version: 2.2.8-prefix/cvs/Linux x86_64, signed Manifest commit with key 0x13CB1360)
Diffstat (limited to 'sci-astronomy')
-rw-r--r--sci-astronomy/funtools/ChangeLog12
-rw-r--r--sci-astronomy/funtools/files/funtools-1.4.4-fix-crashes.patch99
-rw-r--r--sci-astronomy/funtools/files/funtools-1.4.4-fix-hardening.patch68
-rw-r--r--sci-astronomy/funtools/funtools-1.4.4-r3.ebuild (renamed from sci-astronomy/funtools/funtools-1.4.4-r2.ebuild)10
4 files changed, 183 insertions, 6 deletions
diff --git a/sci-astronomy/funtools/ChangeLog b/sci-astronomy/funtools/ChangeLog
index fa2e58b1f8d6..05b8c8821dc4 100644
--- a/sci-astronomy/funtools/ChangeLog
+++ b/sci-astronomy/funtools/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sci-astronomy/funtools
-# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/funtools/ChangeLog,v 1.9 2013/07/08 23:23:33 bicatali Exp $
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/funtools/ChangeLog,v 1.10 2014/02/23 20:18:40 bicatali Exp $
+
+*funtools-1.4.4-r3 (23 Feb 2014)
+
+ 23 Feb 2014; Sébastien Fabbro <bicatali@gentoo.org>
+ +files/funtools-1.4.4-fix-crashes.patch,
+ +files/funtools-1.4.4-fix-hardening.patch, +funtools-1.4.4-r3.ebuild,
+ -funtools-1.4.4-r2.ebuild:
+ Add a few fixes from debian
*funtools-1.4.4-r2 (08 Jul 2013)
diff --git a/sci-astronomy/funtools/files/funtools-1.4.4-fix-crashes.patch b/sci-astronomy/funtools/files/funtools-1.4.4-fix-crashes.patch
new file mode 100644
index 000000000000..75d69089ef13
--- /dev/null
+++ b/sci-astronomy/funtools/files/funtools-1.4.4-fix-crashes.patch
@@ -0,0 +1,99 @@
+Author: Ole Streicher <debian@liska.ath.cx>
+Description: Check cmd line arguments for illegal input that caused crashes
+ found with the "Mayhem" tool.
+Bug: http://bugs.debian.org/715928
+Bug: http://bugs.debian.org/715929
+--- a/funjoin.c
++++ b/funjoin.c
+@@ -737,7 +737,7 @@ main(argc, argv)
+ case 'a':
+ if( argv[i][2] ){
+ j = atoi(&argv[i][2])-1;
+- if( (j >= 0) && (j < MAXIFILE) ){
++ if( (j >= 0) && (j < MAXIFILE) && (i < argc-1)){
+ files[j].actstr = argv[++i];
+ }
+ else{
+@@ -751,7 +751,7 @@ main(argc, argv)
+ case 'b':
+ if( argv[i][2] ){
+ j = atoi(&argv[i][2])-1;
+- if( (j >= 0) && (j < MAXIFILE) ){
++ if( (j >= 0) && (j < MAXIFILE) && (i < argc-1)){
+ files[j].bstr = argv[++i];
+ }
+ else{
+@@ -765,7 +765,7 @@ main(argc, argv)
+ case 'j':
+ if( argv[i][2] ){
+ j = atoi(&argv[i][2])-1;
+- if( (j >= 0) && (j < MAXIFILE) ){
++ if( (j >= 0) && (j < MAXIFILE) && (i < argc-1)){
+ files[j].jname = argv[++i];
+ }
+ else{
+@@ -773,25 +773,35 @@ main(argc, argv)
+ }
+ }
+ else{
+- defcol = argv[++i];
++ if (i < argc-1) {
++ defcol = argv[++i];
++ }
+ }
+ break;
+ case 'm':
+- minmatch = atoi(argv[++i])+1;
++ if (i < argc-1) {
++ minmatch = atoi(argv[++i])+1;
++ }
+ if( minmatch < 1 ) minmatch = 1;
+ break;
+ case 'M':
+- maxmatch = atoi(argv[++i])+1;
++ if (i < argc-1) {
++ maxmatch = atoi(argv[++i])+1;
++ }
+ if( maxmatch < 1 ) maxmatch = 1;
+ break;
+ case 's':
+ jfiles = JFILES_COL;
+ break;
+ case 'S':
+- jfiles = argv[++i];
++ if (i < argc-1) {
++ jfiles = argv[++i];
++ }
+ break;
+ case 't':
+- tol = atof(argv[++i]);
++ if (i < argc-1) {
++ tol = atof(argv[++i]);
++ }
+ if( tol <= 0 ){
+ gerror(stderr, "tolerance value must be positive\n");
+ }
+--- a/funimage.c
++++ b/funimage.c
+@@ -338,12 +338,16 @@ main(argc, argv)
+ t = strchr(s, ',');
+ strncat(newname, s, t-s);
+ strncat(newname, ",y:", SZ_LINE-strlen(newname));
+- s = ++t;
+- t = strchr(s, ',');
+- strncat(newname, s, t-s);
++ if (t != NULL) {
++ s = ++t;
++ t = strchr(s, ',');
++ strncat(newname, s, t-s);
++ }
+ strncat(newname, "),", SZ_LINE-strlen(newname));
+- s = ++t;
+- strncat(newname, s, SZ_LINE-strlen(newname));
++ if (t != NULL) {
++ s = ++t;
++ strncat(newname, s, SZ_LINE-strlen(newname));
++ }
+ iname = newname;
+ }
+
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 000000000000..2f24268d74f2
--- /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
diff --git a/sci-astronomy/funtools/funtools-1.4.4-r2.ebuild b/sci-astronomy/funtools/funtools-1.4.4-r3.ebuild
index e3e1f9e61023..362d5a20a4db 100644
--- a/sci-astronomy/funtools/funtools-1.4.4-r2.ebuild
+++ b/sci-astronomy/funtools/funtools-1.4.4-r3.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/funtools/funtools-1.4.4-r2.ebuild,v 1.1 2013/07/08 23:23:33 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-astronomy/funtools/funtools-1.4.4-r3.ebuild,v 1.1 2014/02/23 20:18:40 bicatali Exp $
EAPI=5
inherit eutils toolchain-funcs multilib autotools
@@ -26,7 +26,10 @@ src_prepare() {
"${FILESDIR}"/${P}-ds9-fixes.patch \
"${FILESDIR}"/${P}-fix-autoheader.patch \
"${FILESDIR}"/${P}-fix-includes.patch \
+ "${FILESDIR}"/${P}-fix-hardening.patch \
+ "${FILESDIR}"/${P}-fix-crashes.patch \
"${FILESDIR}"/${P}-makefiles.patch
+ sed -i -e "s:/usr:${EPREFIX}/usr:g" filter/Makefile.in || die
sed -i \
-e "s:\${LINK}:\${LINK} ${LDFLAGS}:" \
mklib || die "sed for ldflags failed"
@@ -54,6 +57,5 @@ src_install () {
insinto /usr/include/funtools/fitsy
doins fitsy/*.h
use static-libs || rm "${ED}"/usr/$(get_libdir)/lib*.a
- cd doc
- use doc && dodoc *.pdf && dohtml *html *c
+ use doc && cd doc && dodoc *.pdf && dohtml *html *c
}