diff options
author | 2011-12-30 12:11:10 +0000 | |
---|---|---|
committer | 2011-12-30 12:11:10 +0000 | |
commit | 7d534e5121220e4a6edcf8fbb02d1a157e52cac7 (patch) | |
tree | 47f7004d13d6d4b98c0dbc4e0f5cd0ab2ef12d18 /media-libs/tiff | |
parent | Version bump wrt #396465 by Stefan Talpalaru (diff) | |
download | gentoo-2-7d534e5121220e4a6edcf8fbb02d1a157e52cac7.tar.gz gentoo-2-7d534e5121220e4a6edcf8fbb02d1a157e52cac7.tar.bz2 gentoo-2-7d534e5121220e4a6edcf8fbb02d1a157e52cac7.zip |
old
(Portage version: 2.2.0_alpha81/cvs/Linux x86_64)
Diffstat (limited to 'media-libs/tiff')
-rw-r--r-- | media-libs/tiff/ChangeLog | 6 | ||||
-rw-r--r-- | media-libs/tiff/files/tiff-3.9.2-CVE-2009-2347.patch | 89 | ||||
-rw-r--r-- | media-libs/tiff/tiff-4.0.0_beta7.ebuild | 60 |
3 files changed, 5 insertions, 150 deletions
diff --git a/media-libs/tiff/ChangeLog b/media-libs/tiff/ChangeLog index 4e48cd5b1cdf..eb96f88fd7c9 100644 --- a/media-libs/tiff/ChangeLog +++ b/media-libs/tiff/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-libs/tiff # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/tiff/ChangeLog,v 1.177 2011/12/30 12:10:06 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/tiff/ChangeLog,v 1.178 2011/12/30 12:11:10 ssuominen Exp $ + + 30 Dec 2011; Samuli Suominen <ssuominen@gentoo.org> + -files/tiff-3.9.2-CVE-2009-2347.patch, -tiff-4.0.0_beta7.ebuild: + old *tiff-4.0.0 (30 Dec 2011) diff --git a/media-libs/tiff/files/tiff-3.9.2-CVE-2009-2347.patch b/media-libs/tiff/files/tiff-3.9.2-CVE-2009-2347.patch deleted file mode 100644 index 8d30334da380..000000000000 --- a/media-libs/tiff/files/tiff-3.9.2-CVE-2009-2347.patch +++ /dev/null @@ -1,89 +0,0 @@ -http://bugs.gentoo.org/show_bug.cgi?id=307001 -http://bugzilla.maptools.org/show_bug.cgi?id=2079 - ---- tools/tiff2rgba.c -+++ tools/tiff2rgba.c -@@ -125,6 +125,17 @@ - return (0); - } - -+static tsize_t -+multiply(tsize_t m1, tsize_t m2) -+{ -+ tsize_t prod = m1 * m2; -+ -+ if (m1 && prod / m1 != m2) -+ prod = 0; /* overflow */ -+ -+ return prod; -+} -+ - static int - cvt_by_tile( TIFF *in, TIFF *out ) - -@@ -134,6 +145,7 @@ - uint32 tile_width, tile_height; - uint32 row, col; - uint32 *wrk_line; -+ tsize_t raster_size; - int ok = 1; - - TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width); -@@ -151,7 +163,14 @@ - /* - * Allocate tile buffer - */ -- raster = (uint32*)_TIFFmalloc(tile_width * tile_height * sizeof (uint32)); -+ raster_size = multiply(multiply(tile_width, tile_height), sizeof (uint32)); -+ if (!raster_size) { -+ TIFFError(TIFFFileName(in), -+ "Can't allocate buffer for raster of size %lux%lu", -+ (unsigned long) tile_width, (unsigned long) tile_height); -+ return (0); -+ } -+ raster = (uint32*)_TIFFmalloc(raster_size); - if (raster == 0) { - TIFFError(TIFFFileName(in), "No space for raster buffer"); - return (0); -@@ -159,7 +178,7 @@ - - /* - * Allocate a scanline buffer for swapping during the vertical -- * mirroring pass. -+ * mirroring pass. (Request can't overflow given prior checks.) - */ - wrk_line = (uint32*)_TIFFmalloc(tile_width * sizeof (uint32)); - if (!wrk_line) { -@@ -236,6 +255,7 @@ - uint32 width, height; /* image width & height */ - uint32 row; - uint32 *wrk_line; -+ tsize_t raster_size; - int ok = 1; - - TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width); -@@ -251,7 +271,14 @@ - /* - * Allocate strip buffer - */ -- raster = (uint32*)_TIFFmalloc(width * rowsperstrip * sizeof (uint32)); -+ raster_size = multiply(multiply(width, rowsperstrip), sizeof (uint32)); -+ if (!raster_size) { -+ TIFFError(TIFFFileName(in), -+ "Can't allocate buffer for raster of size %lux%lu", -+ (unsigned long) width, (unsigned long) rowsperstrip); -+ return (0); -+ } -+ raster = (uint32*)_TIFFmalloc(raster_size); - if (raster == 0) { - TIFFError(TIFFFileName(in), "No space for raster buffer"); - return (0); -@@ -259,7 +286,7 @@ - - /* - * Allocate a scanline buffer for swapping during the vertical -- * mirroring pass. -+ * mirroring pass. (Request can't overflow given prior checks.) - */ - wrk_line = (uint32*)_TIFFmalloc(width * sizeof (uint32)); - if (!wrk_line) { diff --git a/media-libs/tiff/tiff-4.0.0_beta7.ebuild b/media-libs/tiff/tiff-4.0.0_beta7.ebuild deleted file mode 100644 index 2e26f6a70054..000000000000 --- a/media-libs/tiff/tiff-4.0.0_beta7.ebuild +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/tiff/tiff-4.0.0_beta7.ebuild,v 1.3 2011/04/27 18:01:28 grobian Exp $ - -EAPI=3 -inherit eutils libtool - -MY_P=${P/_} - -DESCRIPTION="Library for manipulation of TIFF (Tag Image File Format) images" -HOMEPAGE="http://www.remotesensing.org/libtiff/" -SRC_URI="ftp://ftp.remotesensing.org/pub/libtiff/${MY_P}.tar.gz" - -LICENSE="as-is" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris" -IUSE="+cxx jbig jpeg static-libs zlib" - -RDEPEND="jpeg? ( virtual/jpeg ) - jbig? ( media-libs/jbigkit ) - zlib? ( sys-libs/zlib )" - -DEPEND="${RDEPEND}" - -S=${WORKDIR}/${MY_P} - -src_prepare() { - epatch "${FILESDIR}"/${PN}-3.9.2-CVE-2009-2347.patch - elibtoolize -} - -src_configure() { - econf \ - --disable-dependency-tracking \ - $(use_enable static-libs static) \ - $(use_enable cxx) \ - $(use_enable zlib) \ - $(use_enable jpeg) \ - $(use_enable jbig) \ - --without-x \ - --with-docdir="${EPREFIX}"/usr/share/doc/${PF} -} - -src_install() { - emake DESTDIR="${D}" install || die - dodoc ChangeLog README TODO - - use static-libs || find "${ED}" -name '*.la' -exec rm -f '{}' + -} - -pkg_postinst() { - if use jbig; then - echo - elog "JBIG support is intended for Hylafax fax compression, so we" - elog "really need more feedback in other areas (most testing has" - elog "been done with fax). Be sure to recompile anything linked" - elog "against tiff if you rebuild it with jbig support." - echo - fi -} |