summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarinus Schraal <foser@gentoo.org>2005-03-30 09:51:37 +0000
committerMarinus Schraal <foser@gentoo.org>2005-03-30 09:51:37 +0000
commit8c4bc58ed48a3eb4624afdef4a8f94483023a9b6 (patch)
tree403ca013e0bbaf87a8bb4adbe949f68aed08c0ff /media-libs/gdk-pixbuf
parentdigest fix (diff)
downloadgentoo-2-8c4bc58ed48a3eb4624afdef4a8f94483023a9b6.tar.gz
gentoo-2-8c4bc58ed48a3eb4624afdef4a8f94483023a9b6.tar.bz2
gentoo-2-8c4bc58ed48a3eb4624afdef4a8f94483023a9b6.zip
add bmp loader fix
(Portage version: 2.0.51.19)
Diffstat (limited to 'media-libs/gdk-pixbuf')
-rw-r--r--media-libs/gdk-pixbuf/Manifest9
-rw-r--r--media-libs/gdk-pixbuf/files/digest-gdk-pixbuf-0.22.0-r41
-rw-r--r--media-libs/gdk-pixbuf/files/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch48
-rw-r--r--media-libs/gdk-pixbuf/gdk-pixbuf-0.22.0-r4.ebuild68
4 files changed, 123 insertions, 3 deletions
diff --git a/media-libs/gdk-pixbuf/Manifest b/media-libs/gdk-pixbuf/Manifest
index 275dd8d39fae..cfa8e4833dff 100644
--- a/media-libs/gdk-pixbuf/Manifest
+++ b/media-libs/gdk-pixbuf/Manifest
@@ -1,10 +1,13 @@
-MD5 18aa044e5155ebc7a6cd0e32c86c5de1 gdk-pixbuf-0.22.0.ebuild 1306
MD5 3826b463f06d731336873a516b683bd4 gdk-pixbuf-0.22.0-r2.ebuild 1502
-MD5 c8b5e670856dfc60c58cf653f8c5372e ChangeLog 5943
+MD5 18aa044e5155ebc7a6cd0e32c86c5de1 gdk-pixbuf-0.22.0.ebuild 1306
+MD5 34ab2bccb938231592ef46e1ffdb17d6 gdk-pixbuf-0.22.0-r4.ebuild 1753
MD5 9dcfbabc6910dbdf835de445608d844d gdk-pixbuf-0.22.0-r3.ebuild 1678
+MD5 c8b5e670856dfc60c58cf653f8c5372e ChangeLog 5943
MD5 03ad2e6c4ab41244af1015a8bbb0b39f metadata.xml 158
+MD5 84c943ddbc93a756c745f969e9d542e2 files/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch 1256
MD5 5f59d5772b1482d885a180dbc581cf84 files/gdk-pixbuf-0.22.0-bmp_secure.patch 557
-MD5 6311cee2e3fa5106adf17758b5dab6c6 files/gdk-pixbuf-0.22.0-loaders.patch 2307
MD5 7cb705de10c34e6b633af2ff2912e908 files/digest-gdk-pixbuf-0.22.0-r2 70
MD5 7cb705de10c34e6b633af2ff2912e908 files/digest-gdk-pixbuf-0.22.0-r3 70
+MD5 7cb705de10c34e6b633af2ff2912e908 files/digest-gdk-pixbuf-0.22.0-r4 70
+MD5 6311cee2e3fa5106adf17758b5dab6c6 files/gdk-pixbuf-0.22.0-loaders.patch 2307
MD5 7cb705de10c34e6b633af2ff2912e908 files/digest-gdk-pixbuf-0.22.0 70
diff --git a/media-libs/gdk-pixbuf/files/digest-gdk-pixbuf-0.22.0-r4 b/media-libs/gdk-pixbuf/files/digest-gdk-pixbuf-0.22.0-r4
new file mode 100644
index 000000000000..ce45f33770cf
--- /dev/null
+++ b/media-libs/gdk-pixbuf/files/digest-gdk-pixbuf-0.22.0-r4
@@ -0,0 +1 @@
+MD5 05fcb68ceaa338614ab650c775efc2f2 gdk-pixbuf-0.22.0.tar.bz2 398208
diff --git a/media-libs/gdk-pixbuf/files/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch b/media-libs/gdk-pixbuf/files/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch
new file mode 100644
index 000000000000..ffb4378aa3ab
--- /dev/null
+++ b/media-libs/gdk-pixbuf/files/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch
@@ -0,0 +1,48 @@
+--- gdk-pixbuf-0.22.0/gdk-pixbuf/io-bmp.c 2002-09-27 23:12:40.000000000 +0200
++++ gdk-pixbuf-0.22.0.patched/gdk-pixbuf/io-bmp.c 2005-03-30 01:33:06.000000000 +0200
+@@ -31,8 +31,6 @@
+ #include "gdk-pixbuf-private.h"
+ #include "gdk-pixbuf-io.h"
+
+-
+-
+ #if 0
+ /* If these structures were unpacked, they would define the two headers of the
+ * BMP file. After them comes the palette, and then the image data.
+@@ -206,7 +204,7 @@
+
+ if (State == NULL)
+ return NULL;
+-
++
+ while (feof(f) == 0) {
+ length = fread(membuf, 1, sizeof (membuf), f);
+ if (length > 0)
+@@ -245,11 +243,26 @@
+ static gboolean
+ grow_buffer (struct bmp_progressive_state *State)
+ {
+- guchar *tmp = realloc (State->buff, State->BufferSize);
++ guchar *tmp;
++
++ if (State->BufferSize == 0) {
++#if 0
++ g_set_error (error,
++ GDK_PIXBUF_ERROR,
++ GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
++ _("BMP image has bogus header data"));
++#endif
++ State->read_state = READ_STATE_ERROR;
++ return FALSE;
++ }
++
++ tmp = realloc (State->buff, State->BufferSize);
++
+ if (!tmp) {
+ State->read_state = READ_STATE_ERROR;
+ return FALSE;
+ }
++
+ State->buff = tmp;
+ return TRUE;
+ }
diff --git a/media-libs/gdk-pixbuf/gdk-pixbuf-0.22.0-r4.ebuild b/media-libs/gdk-pixbuf/gdk-pixbuf-0.22.0-r4.ebuild
new file mode 100644
index 000000000000..735a316a0bf6
--- /dev/null
+++ b/media-libs/gdk-pixbuf/gdk-pixbuf-0.22.0-r4.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/gdk-pixbuf/gdk-pixbuf-0.22.0-r4.ebuild,v 1.1 2005/03/30 09:51:37 foser Exp $
+
+inherit virtualx libtool gnome.org gnuconfig eutils
+
+DESCRIPTION="GNOME Image Library"
+HOMEPAGE="http://www.gtk.org/"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc"
+IUSE="doc mmx"
+
+RDEPEND="media-libs/jpeg
+ media-libs/tiff
+ =x11-libs/gtk+-1.2*
+ >=media-libs/libpng-1.2.1
+ amd64? ( sys-libs/db )
+ !amd64? ( <sys-libs/db-2 )
+ >=gnome-base/gnome-libs-1.4.1.2-r1"
+# We need gnome-libs here, else gnome support do not get compiled into
+# gdk-pixbuf (the GnomeCanvasPixbuf library )
+DEPEND="${RDEPEND}
+ doc? ( dev-util/gtk-doc )"
+
+src_unpack() {
+
+ unpack ${A}
+
+ cd ${S}
+ # security fix (#64230)
+ epatch ${FILESDIR}/${P}-bmp_secure.patch
+ epatch ${FILESDIR}/${P}-loaders.patch
+ # reject corrupt bmps (#64230)
+ epatch ${FILESDIR}/${P}-bmp_reject_corrupt.patch
+
+}
+
+src_compile() {
+ #allow to build on mipslinux systems
+ gnuconfig_update
+
+ local myconf
+ #update libtool, else we get the "relink bug"
+ elibtoolize
+
+ use doc && myconf="--enable-gtk-doc" \
+ || myconf="--disable-gtk-doc"
+ use mmx || myconf="${myconf} --disable-mmx"
+ econf --sysconfdir=/etc/X11/gdk-pixbuf ${myconf} || die
+
+ #build needs to be able to
+ #connect to an X display.
+ Xemake || die
+}
+
+src_install() {
+ einstall \
+ sysconfdir=${D}/etc/X11/gdk-pixbuf || die
+
+ dosed -e "s:${D}::g" /usr/bin/gdk-pixbuf-config
+ #fix permissions on the loaders
+ chmod a+rx ${D}/usr/$(get_libdir)/gdk-pixbuf/loaders
+ chmod a+r ${D}/usr/$(get_libdir)/gdk-pixbuf/loaders/*
+
+ dodoc AUTHORS COPYING* ChangeLog INSTALL README NEWS TODO
+}