summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/gdk-pixbuf/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2009-03-14 04:21:17 (GMT)
committerJames Meyer <james.meyer@operamail.com>2009-03-14 04:21:17 (GMT)
commit56ba5f3c5e06af89fd0bf710839635d3e5f1ac60 (patch)
tree468926664c785321a996db8beffc6a7a20d5e2a8 /abs/core-testing/gdk-pixbuf/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch
parentee7d8d75c14ed0ae36cc0e34ae150012c97e197d (diff)
downloadlinhes_pkgbuild-56ba5f3c5e06af89fd0bf710839635d3e5f1ac60.zip
linhes_pkgbuild-56ba5f3c5e06af89fd0bf710839635d3e5f1ac60.tar.gz
linhes_pkgbuild-56ba5f3c5e06af89fd0bf710839635d3e5f1ac60.tar.bz2
Moving several more packages to core, because they are dependencies of other packages in core.
xosd esound ftgl gdk-pixbuf glib gtklibmpg2 libvisual libxml-perl perl-xml-regexp projectm libdv libmng
Diffstat (limited to 'abs/core-testing/gdk-pixbuf/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch')
-rw-r--r--abs/core-testing/gdk-pixbuf/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/abs/core-testing/gdk-pixbuf/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch b/abs/core-testing/gdk-pixbuf/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch
new file mode 100644
index 0000000..ffb4378
--- /dev/null
+++ b/abs/core-testing/gdk-pixbuf/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;
+ }