glib/gio/xdgmime
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
..
.gitignore gio/ docs/reference/gio Merged gio-standalone into glib. 2007-11-26 16:13:05 +00:00
Makefile.am Rework the build system for a new tests approach 2013-05-31 23:12:15 -04:00
xdgmime.c xdgmime: Fix an invalid read 2013-10-04 22:08:36 +02:00
xdgmime.h Don't compile some unused functions in gio/xdgmime/ 2010-08-08 21:32:04 -04:00
xdgmimealias.c Don't compile some unused functions in gio/xdgmime/ 2010-08-08 21:32:04 -04:00
xdgmimealias.h Don't compile some unused functions in gio/xdgmime/ 2010-08-08 21:32:04 -04:00
xdgmimecache.c xdgmime: Fix an invalid read 2013-10-04 22:08:36 +02:00
xdgmimecache.h Don't compile some unused functions in gio/xdgmime/ 2010-08-08 21:32:04 -04:00
xdgmimeglob.c Don't compile some unused functions in gio/xdgmime/ 2010-08-08 21:32:04 -04:00
xdgmimeglob.h Don't compile some unused functions in gio/xdgmime/ 2010-08-08 21:32:04 -04:00
xdgmimeicon.c Don't compile some unused functions in gio/xdgmime/ 2010-08-08 21:32:04 -04:00
xdgmimeicon.h Don't compile some unused functions in gio/xdgmime/ 2010-08-08 21:32:04 -04:00
xdgmimeint.c Include "config.h" instead of <config.h> Command used: find -name 2008-06-22 15:10:51 +00:00
xdgmimeint.h Sync with upstream 2008-06-09 16:45:19 +00:00
xdgmimemagic.c fix a few warnings on non-Linux 2011-09-04 17:50:41 -04:00
xdgmimemagic.h Sync with upstream 2008-06-09 16:45:19 +00:00
xdgmimeparent.c Silence an uninitialize variable warning 2011-06-14 09:44:45 -04:00
xdgmimeparent.h Don't compile some unused functions in gio/xdgmime/ 2010-08-08 21:32:04 -04:00