Skip to content

xdgmime: Prevent infinite loops from badly-formed MIME registrations

Prevent recursion of _xdg_mime_cache_mime_type_subclass() with the same value of argument mime for the subclasses of a MIME type.

This was observed in GLib as https://gitlab.gnome.org/GNOME/glib/-/issues/1875, and a backtrace of the infinite loop is here: https://gitlab.gnome.org/GNOME/glib/-/issues/1875#note_592829.

Signed-off-by: Philip Withnall withnall@endlessm.com

Helps: #32

Edited by Philip Withnall

Merge request reports