From owner-freebsd-bugs@FreeBSD.ORG Sun Oct 17 02:10:19 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9A29E16A4CE for ; Sun, 17 Oct 2004 02:10:19 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 65BF243D68 for ; Sun, 17 Oct 2004 02:10:19 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i9H2AJnI079240 for ; Sun, 17 Oct 2004 02:10:19 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i9H2AJLm079239; Sun, 17 Oct 2004 02:10:19 GMT (envelope-from gnats) Resent-Date: Sun, 17 Oct 2004 02:10:19 GMT Resent-Message-Id: <200410170210.i9H2AJLm079239@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Nobuhiro Yasutomi Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E53D016A4CE for ; Sun, 17 Oct 2004 02:04:15 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id D2EC643D39 for ; Sun, 17 Oct 2004 02:04:15 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i9H24F35028964 for ; Sun, 17 Oct 2004 02:04:15 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.11/8.12.11/Submit) id i9H24Fkn028963; Sun, 17 Oct 2004 02:04:15 GMT (envelope-from nobody) Message-Id: <200410170204.i9H24Fkn028963@www.freebsd.org> Date: Sun, 17 Oct 2004 02:04:15 GMT From: Nobuhiro Yasutomi To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: misc/72775: graphics/gdk-pixbuf security patch mistakes X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Oct 2004 02:10:19 -0000 >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@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: