misc/72775: graphics/gdk-pixbuf security patch mistakes
Nobuhiro Yasutomi
nobuhiro.yasutomi at nifty.ne.jp
Sat Oct 16 19:10:19 PDT 2004
>Number: 72775
>Category: misc
>Synopsis: graphics/gdk-pixbuf security patch mistakes
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Oct 17 02:10:19 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: Nobuhiro Yasutomi
>Release: FreeBSD 5.2.1-RELEASE i386
>Organization:
FreeBSD 5.2.1-RELEASE i386
>Environment:
FreeBSD alex.mysite.jp 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #1: Tue Aug 31 03:55:48 JST 2004 root at alex.mysite.jp:/usr/src/sys/i386/compile/ALEX i386
>Description:
last added security patch include glib-2 calling entry `g_try_malloc'. Therefor make violation runtime linking.
>How-To-Repeat:
just run graphics/pornview :-)
>Fix:
replace g_try_malloc to g_malloc
--- files/-patch-pixbuf-security Tue Oct 12 05:05:25 2004
+++ files/patch-pixbuf-security Sun Oct 17 09:53:20 2004
@@ -34,14 +34,14 @@
- 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));
++ name_buf = (gchar *) g_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);
++ colors = (_XPMColor *) g_malloc (sizeof (_XPMColor) * n_col);
+ if (!colors) {
+ g_warning ("Cannot allocate memory for loading XPM image");
+ g_hash_table_destroy (color_hash);
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list