Bug#260192: marked as done (gedit: PATCH: premature free in egg-recent-view-gtk.c)

Debian Bug Tracking System owner@bugs.debian.org
Wed, 19 Jan 2005 12:35:01 -0800


Your message dated Wed, 19 Jan 2005 21:04:09 +0100
with message-id <20050119200409.GA18335@bugs.debian.org>
and subject line gedit: PATCH: premature free in egg-recent-view-gtk.c
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 19 Jul 2004 09:17:55 +0000
>From pmoulder@bowman.csse.monash.edu.au Mon Jul 19 02:17:55 2004
Return-path: <pmoulder@bowman.csse.monash.edu.au>
Received: from alpha9.its.monash.edu.au [130.194.1.9] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BmUHT-00051V-00; Mon, 19 Jul 2004 02:17:55 -0700
Received: from localhost ([130.194.13.82]) by vaxh.its.monash.edu.au
 (PMDF V5.2-31 #39306)
 with ESMTP id <01LCNNB5BGZS8Y6N8D@vaxh.its.monash.edu.au> for
 submit@bugs.debian.org; Mon, 19 Jul 2004 19:16:09 +1000
Received: from larry.its.monash.edu.au (localhost.localdomain [127.0.0.1])
	by localhost (Postfix) with ESMTP id DC4FC80033	for <submit@bugs.debian.org>;
 Mon, 19 Jul 2004 19:16:08 +1000 (EST)
Received: from nexus.csse.monash.edu.au
 (nexus.csse.monash.edu.au [130.194.64.4])	by larry.its.monash.edu.au (Postfix)
 with ESMTP id CAAAB3C00B	for <submit@bugs.debian.org>; Mon,
 19 Jul 2004 19:16:08 +1000 (EST)
Received: from bowman.csse.monash.edu.au
 (mail@bowman.csse.monash.edu.au [130.194.226.120])	by nexus.csse.monash.edu.au
 (8.12.8+Sun/8.12.8) with ESMTP id i6J9G8TL024107	for <submit@bugs.debian.org>;
 Mon, 19 Jul 2004 19:16:08 +1000 (EST)
Received: from pmoulder by bowman.csse.monash.edu.au with local
 (Exim 3.36 #1 (Debian))	id 1BmUFc-0007cu-00; Mon, 19 Jul 2004 19:16:00 +1000
Date: Mon, 19 Jul 2004 19:16:00 +1000
From: Peter Moulder <pmoulder@bowman.csse.monash.edu.au>
Subject: gedit: PATCH: premature free in egg-recent-view-gtk.c
To: Debian Bug Tracking System <submit@bugs.debian.org>
Message-id: <E1BmUFc-0007cu-00@bowman.csse.monash.edu.au>
MIME-version: 1.0
X-Mailer: reportbug 2.62
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

Package: gedit
Version: 2.6.1-1
Severity: normal


In egg_recent_view_gtk_new_menu_item, uri is passed to
egg_recent_util_get_icon after already being freed.

uri is subsequently passed to, and presumably read by, gnome_icon_lookup.
This will typically result in the wrong icon being shown (e.g. no icon),
or conceivably result in segfault from reading unmapped memory.

Patch appended.

pjrm.


diff -dur gedit-2.6.1/gedit/recent-files/egg-recent-view-gtk.c gedit-2.6.1-pjrm/gedit/recent-files/egg-recent-view-gtk.c
--- gedit-2.6.1/gedit/recent-files/egg-recent-view-gtk.c	2003-01-22 10:52:27.000000000 +1100
+++ gedit-2.6.1-pjrm/gedit/recent-files/egg-recent-view-gtk.c	2004-07-19 18:33:52.000000000 +1000
@@ -207,7 +207,6 @@
 		basename = g_path_get_basename (uri);
 		escaped = egg_recent_util_escape_underlines (basename);
 		g_free (basename);
-		g_free (uri);
 
 		if (view->show_numbers) {
 			/* avoid having conflicting mnemonics */
@@ -240,6 +239,7 @@
 #else
 		pixbuf = NULL;
 #endif
+		g_free (uri);
 		image = gtk_image_new_from_pixbuf (pixbuf);
 		if (pixbuf)
 			g_object_unref (pixbuf);

---------------------------------------
Received: (at 260192-done) by bugs.debian.org; 19 Jan 2005 20:04:19 +0000
>From lool@bee.dooz.org Wed Jan 19 12:04:18 2005
Return-path: <lool@bee.dooz.org>
Received: from postfix4-1.free.fr [213.228.0.62] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1CrM3r-000334-00; Wed, 19 Jan 2005 12:04:15 -0800
Received: from bee.dooz.org (levallois.dooz.org [81.57.180.178])
	by postfix4-1.free.fr (Postfix) with ESMTP id 6EE7227129E;
	Wed, 19 Jan 2005 21:04:10 +0100 (CET)
Received: by bee.dooz.org (Postfix, from userid 1000)
	id 00A0B6804EDE; Wed, 19 Jan 2005 21:04:09 +0100 (CET)
Date: Wed, 19 Jan 2005 21:04:09 +0100
From: =?iso-8859-1?Q?Lo=EFc?= Minier <lool@dooz.org>
To: Peter Moulder <pmoulder@bowman.csse.monash.edu.au>,
	260192-done@bugs.debian.org, seb128@debian.org
Subject: Re: gedit: PATCH: premature free in egg-recent-view-gtk.c
Message-ID: <20050119200409.GA18335@bugs.debian.org>
References: <E1BmUFc-0007cu-00@bowman.csse.monash.edu.au>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
In-Reply-To: <E1BmUFc-0007cu-00@bowman.csse.monash.edu.au>
Content-Transfer-Encoding: quoted-printable
Delivered-To: 260192-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 
	version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

        Hi,

 This is a followup for Debian bug <http://bugs.debian.org/260192>.

Peter Moulder <pmoulder@bowman.csse.monash.edu.au> - Mon, Jul 19, 2004:

> Patch appended.
> diff -dur gedit-2.6.1/gedit/recent-files/egg-recent-view-gtk.c gedit-2.=
6.1-pjrm/gedit/recent-files/egg-recent-view-gtk.c

 I'm sorry, but 6 months ago, Sebastien Bacher tried to understand what
 your patch basically does and couldn't, and since he did not get a
 reply from you, that bug got stuck.

 I think this bug is now obsolete (I've looked into
 egg-recent-view-gtk.c, and couldn't find any similar looking lines any
 more, function calls and parameters name have changed meanwhile).

 Hence, I'm closing the bug, and I'm sorry if your patch could not be
 used in a timely manner.  Please reopen this bug and explain your patch
 for us if the problem is still there.

   Regards,

--=20
Lo=EFc Minier <lool@dooz.org>
"Neutral President: I have no strong feelings one way or the other."