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 160838 - Fun with _xdg_mime_alias_read_from_file and _xdg_mime_parent_read_from_file
Fun with _xdg_mime_alias_read_from_file and _xdg_mime_parent_read_from_file
Status: RESOLVED FIXED
Product: gnome-vfs
Classification: Deprecated
Component: MIME and file/program mapping
cvs (head)
Other Linux
: Urgent blocker
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
Depends on:
Blocks:
 
 
Reported: 2004-12-09 07:27 UTC by Mariano Suárez-Alvarez
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix all that (2.44 KB, patch)
2004-12-09 07:29 UTC, Mariano Suárez-Alvarez
none Details | Review

Description Mariano Suárez-Alvarez 2004-12-09 07:27:34 UTC
This function is not accumulating the result across the different calls
corresponding to each dir in XDG_DATA_DIRS, because of the line reading

  list->aliases = malloc (alloc * sizeof (XdgAlias));

The call to qsort should be protected with a if (list->n_aliases > 0), since the
call to reallocate which immediately precedes it might set list->aliases to NULL.

Same comments on _xdg_mime_parent_read_from_file.
Comment 1 Mariano Suárez-Alvarez 2004-12-09 07:28:44 UTC
Setting version and marking as important, as this causes crashes on anything
using the mime system for me, and I guess for others.
Comment 2 Mariano Suárez-Alvarez 2004-12-09 07:29:19 UTC
Created attachment 34651 [details] [review]
Fix all that
Comment 3 Matthias Clasen 2004-12-09 14:15:16 UTC
Fixed in the gtk copy now.
Comment 4 Christophe Fergeau 2004-12-09 15:45:15 UTC
Fixed in gnome-vfs CVS too, as well as in the master xdgmime copy in
freedesktop.org CVS.