Kalev Lember be7f40185f xdgmime: Fix an invalid read
This commit factors out a function for comparing string suffixes, and at
the same time makes it safe for mime types that are shorter than the
"/*" suffix.

==25418== Invalid read of size 1
==25418==    at 0x3C6D0F9D22: __gio_xdg_cache_mime_type_subclass (xdgmimecache.c:848)
==25418==    by 0x3C6D09ED8C: g_content_type_is_a (gcontenttype.c:158)
==25418==    by 0x34D8031E95: gtk_recent_filter_filter (gtkrecentfilter.c:733)
==25418==    by 0x34D802F167: _gtk_recent_chooser_get_items (gtkrecentchooserutils.c:387)
==25418==    by 0x34D802D07F: idle_populate_func (gtkrecentchoosermenu.c:1011)
==25418==    by 0x34D7A20477: gdk_threads_dispatch (gdk.c:804)
==25418==    by 0x3C6C0492F5: g_main_context_dispatch (gmain.c:3065)
==25418==    by 0x3C6C049677: g_main_context_iterate.isra.23 (gmain.c:3712)
==25418==    by 0x3C6C04972B: g_main_context_iteration (gmain.c:3773)
==25418==    by 0x34D7FC2AF4: gtk_main_iteration (gtkmain.c:1262)
==25418==    by 0x408EB4: main (in /usr/bin/glade)

https://bugzilla.gnome.org/show_bug.cgi?id=708529
2013-10-04 22:08:36 +02:00
..
2013-10-03 10:37:30 -04:00
2013-10-04 09:51:31 -04:00
2013-10-04 22:08:36 +02:00
2012-12-12 15:20:22 +01:00
2012-02-02 16:22:42 +01:00
2013-06-30 10:32:18 +02:00
2013-02-15 05:39:20 -05:00
2013-04-21 16:25:15 -04:00
2012-07-03 21:14:41 -04:00
2013-05-25 23:15:36 -04:00
2013-06-23 14:15:05 +02:00
2013-04-21 16:31:14 -04:00
2013-02-04 22:35:29 -05:00
2012-11-28 00:58:03 -05:00
2013-04-21 16:31:14 -04:00
2013-07-11 12:35:45 -04:00
2011-06-07 08:55:31 +08:00
2013-10-04 09:51:31 -04:00
2012-11-29 16:29:47 -03:00
2011-02-08 10:05:00 -05:00
2012-12-12 15:20:22 +01:00
2011-02-08 10:05:00 -05:00
2012-08-19 02:21:02 -04:00
2012-08-19 02:21:02 -04:00
2013-07-11 12:35:45 -04:00
2013-07-11 12:35:45 -04:00
2011-06-04 18:48:19 -04:00
2012-01-13 17:12:57 +01:00
2012-12-29 00:22:34 -05:00
2011-08-29 14:49:32 -04:00
2013-10-04 09:51:31 -04:00
2011-10-16 21:41:15 -04:00
2013-06-30 10:32:18 +02:00
2013-03-26 10:51:48 +01:00
2011-10-02 22:33:10 -04:00
2013-04-21 16:31:14 -04:00
2012-07-03 21:14:41 -04:00
2012-11-15 14:19:06 -05:00
2012-08-18 23:15:58 -04:00