2008-04-16 Matthias Clasen <mclasen@redhat.com>
+ Partically revert the last commit after realizing that
+ xdg_mime_media_type_equal doesn't have to init at all.
+
+ * xdgmime/xdgmime.h:
+ * xdgmime/xdgmime.c: Get rid of _xdg_mime_media_type_equal
+
+ * xdgmime/xdgmimecache.c: Use xdg_mime_media_type_equal
+
+2008-04-16 Matthias Clasen <mclasen@redhat.com>
+
Avoid possible memory corruption in xdgmime, fd.o bug 12512,
reported by Joe Shaw and Federico Mena Quintero.
}
int
-_xdg_mime_media_type_equal (const char *mime_a,
- const char *mime_b)
+xdg_mime_media_type_equal (const char *mime_a,
+ const char *mime_b)
{
char *sep;
return 0;
}
-int
-xdg_mime_media_type_equal (const char *mime_a,
- const char *mime_b)
-{
- xdg_mime_init ();
-
- return _xdg_mime_media_type_equal (mime_a, mime_b);
-}
-
#if 1
static int
xdg_mime_is_super_type (const char *mime)
/* Private versions of functions that don't call xdg_mime_init () */
int _xdg_mime_mime_type_equal (const char *mime_a,
const char *mime_b);
-int _xdg_mime_media_type_equal (const char *mime_a,
- const char *mime_b);
int _xdg_mime_mime_type_subclass (const char *mime,
const char *base);
const char *_xdg_mime_unalias_mime_type (const char *mime);
#if 1
/* Handle supertypes */
if (is_super_type (ubase) &&
- _xdg_mime_media_type_equal (umime, ubase))
+ xdg_mime_media_type_equal (umime, ubase))
return 1;
#endif