summaryrefslogtreecommitdiff
path: root/graphics/gdk-pixbuf/patches
diff options
context:
space:
mode:
authorhe <he>2012-05-25 08:31:35 +0000
committerhe <he>2012-05-25 08:31:35 +0000
commitb28cda952b1dea650dcd917fc31c21ddf53600ea (patch)
treea284b355f7dc7eb310309d3d06e2857b6f50e7c7 /graphics/gdk-pixbuf/patches
parentf6b740445a9f308c0974ee8427410283535062c7 (diff)
downloadpkgsrc-b28cda952b1dea650dcd917fc31c21ddf53600ea.tar.gz
Add fix for http://secunia.com/advisories/49125/, taken from
http://bugzilla-attachments.gnome.org/attachment.cgi?id=212053.
Diffstat (limited to 'graphics/gdk-pixbuf/patches')
-rw-r--r--graphics/gdk-pixbuf/patches/patch-ao35
1 files changed, 35 insertions, 0 deletions
diff --git a/graphics/gdk-pixbuf/patches/patch-ao b/graphics/gdk-pixbuf/patches/patch-ao
new file mode 100644
index 00000000000..be27cc78662
--- /dev/null
+++ b/graphics/gdk-pixbuf/patches/patch-ao
@@ -0,0 +1,35 @@
+$NetBSD: patch-ao,v 1.1 2012/05/25 08:31:35 he Exp $
+
+Add fix for http://secunia.com/advisories/49125/, taken from
+http://bugzilla-attachments.gnome.org/attachment.cgi?id=212053.
+
+--- gdk-pixbuf/io-xbm.c.orig 2001-01-21 04:13:40.000000000 +0000
++++ gdk-pixbuf/io-xbm.c
+@@ -177,10 +177,16 @@ read_bitmap_file_data (FILE *fstream,
+ type++;
+ }
+
+- if (!strcmp ("width", type))
++ if (!strcmp ("width", type)) {
++ if (value <= 0)
++ RETURN (FALSE);
+ ww = (unsigned int) value;
+- if (!strcmp ("height", type))
++ }
++ if (!strcmp ("height", type)) {
++ if (value <= 0)
++ RETURN (FALSE);
+ hh = (unsigned int) value;
++ }
+ if (!strcmp ("hot", type)) {
+ if (type-- == name_and_type
+ || type-- == name_and_type)
+@@ -221,6 +227,8 @@ read_bitmap_file_data (FILE *fstream,
+ bytes_per_line = (ww+7)/8 + padding;
+
+ size = bytes_per_line * hh;
++ if (size / bytes_per_line != hh) /* overflow */
++ RETURN (FALSE);
+ bits = g_malloc (size);
+
+ if (version10p) {