summaryrefslogtreecommitdiff
path: root/graphics/gdk-pixbuf
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2004-10-17 21:08:40 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2004-10-17 21:08:40 +0000
commitca8f1390f3b9faa879f9fefda0c2c8240a3eb992 (patch)
tree24148bc32cab5e62f5930bc5026e6c65a796833f /graphics/gdk-pixbuf
parentUpdate to adzap-20041012 (diff)
Glib 1.2 did not have a g_try_malloc() function, so use g_malloc() instead.
Since a g_malloc() failure will abort the running application, we no longer need to check the result. PR: 72775
Notes
Notes: svn path=/head/; revision=119691
Diffstat (limited to 'graphics/gdk-pixbuf')
-rw-r--r--graphics/gdk-pixbuf/Makefile2
-rw-r--r--graphics/gdk-pixbuf/files/patch-pixbuf-security22
2 files changed, 6 insertions, 18 deletions
diff --git a/graphics/gdk-pixbuf/Makefile b/graphics/gdk-pixbuf/Makefile
index 131e45cab78a..e80d9a3cad39 100644
--- a/graphics/gdk-pixbuf/Makefile
+++ b/graphics/gdk-pixbuf/Makefile
@@ -7,7 +7,7 @@
PORTNAME?= gdk-pixbuf
PORTVERSION= 0.22.0
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES?= graphics
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/gdk-pixbuf/0.22
diff --git a/graphics/gdk-pixbuf/files/patch-pixbuf-security b/graphics/gdk-pixbuf/files/patch-pixbuf-security
index 44c4eb8da4b9..cae13c9d432a 100644
--- a/graphics/gdk-pixbuf/files/patch-pixbuf-security
+++ b/graphics/gdk-pixbuf/files/patch-pixbuf-security
@@ -11,9 +11,9 @@
if (State->HeaderSize>State->BytesInHeaderBuf) {
guchar *tmp=realloc(State->HeaderBuf,State->HeaderSize);
if (!tmp)
---- gdk-pixbuf/io-xpm.c.orig Mon Oct 11 15:47:42 2004
-+++ gdk-pixbuf/io-xpm.c Mon Oct 11 16:01:13 2004
-@@ -352,16 +352,33 @@
+--- io-xpm.c.orig Thu Mar 1 15:16:28 2001
++++ io-xpm.c Sun Oct 17 17:05:38 2004
+@@ -352,16 +352,21 @@
return NULL;
}
sscanf (buffer, "%d %d %d %d", &w, &h, &n_col, &cpp);
@@ -34,20 +34,8 @@
- name_buf = g_new (gchar, n_col * (cpp + 1));
- colors = g_new (_XPMColor, n_col);
-+ name_buf = (gchar *) g_try_malloc (n_col * (cpp + 1));
-+ if (!name_buf) {
-+ g_warning ("Cannot allocate memory for loading XPM image");
-+ g_hash_table_destroy (color_hash);
-+ return NULL;
-+ }
-+
-+ colors = (_XPMColor *) g_try_malloc (sizeof (_XPMColor) * n_col);
-+ if (!colors) {
-+ g_warning ("Cannot allocate memory for loading XPM image");
-+ g_hash_table_destroy (color_hash);
-+ g_free (name_buf);
-+ return NULL;
-+ }
++ name_buf = (gchar *) g_malloc (n_col * (cpp + 1));
++ colors = (_XPMColor *) g_malloc (sizeof (_XPMColor) * n_col);
for (cnt = 0; cnt < n_col; cnt++) {
gchar *color_name;