After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 597547 - use of local variable after free
use of local variable after free
Status: RESOLVED FIXED
Product: bonobo
Classification: Deprecated
Component: libbonobo
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Michael Meeks
bonobo qa
Depends on:
Blocks:
 
 
Reported: 2009-10-06 13:08 UTC by Vincent Untz
Modified: 2009-10-06 20:15 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Vincent Untz 2009-10-06 13:08:03 UTC
Forwarding https://bugzilla.novell.com/show_bug.cgi?id=527409

I just had a look at factory package libbonobo-2.24.1-3.3

For source code file
libbonobo-2.24.1/bonobo-activation/bonobo-activation-mime.c
around line 300 is the source code for the
function gnome_vfs_mime_get_short_list_components.

I notice the following lines of code

        g_free (supertype);

then

        sort[1] = g_strconcat ("bonobo:supported_mime_types.has ('", supertype,
"')", NULL);

It seems slighty less than optimal to use the local variable supertype
after is has been freed.  Suggest code rework.
Comment 1 Michael Meeks 2009-10-06 20:15:08 UTC
Wow - quite right :-)

obvious fix committed - I wonder has that method been used recently at all ? ;-)