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 595972 - possibly invalid search in mime_info_cache_dir_add_desktop_entries()
possibly invalid search in mime_info_cache_dir_add_desktop_entries()
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
2.21.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2009-09-22 16:28 UTC by Stanislav Brabec
Modified: 2009-09-30 00:55 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Stanislav Brabec 2009-09-22 16:28:05 UTC
mime_info_cache_dir_add_desktop_entries() contains:

g_list_find (desktop_file_ids, new_desktop_file_ids[i])

But new_desktop_file_ids is an array of strings and all strings are g_strdup()ed before inserting to the list.

It seems, that this g_list_find() always returns NULL.

Guessing that the correct should be:

g_list_find_custom (desktop_file_ids, new_desktop_file_ids[i], strcmp)
Comment 1 Stanislav Brabec 2009-09-24 14:10:52 UTC
Bug 596192 provides a more complex patch including a fix of this bug.