aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2004-10-18 05:08:40 +0800
committermarcus <marcus@FreeBSD.org>2004-10-18 05:08:40 +0800
commita21268054d370450a5007b03919b8a2d32f47161 (patch)
tree09547400c9a005376c4620ee59c93133a4fa97ac
parentc0d0331a495f8d9a1f2e4822167cb1ecb1e176b9 (diff)
downloadfreebsd-ports-gnome-a21268054d370450a5007b03919b8a2d32f47161.tar.gz
freebsd-ports-gnome-a21268054d370450a5007b03919b8a2d32f47161.tar.zst
freebsd-ports-gnome-a21268054d370450a5007b03919b8a2d32f47161.zip
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
-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;