• Kalev Lember's avatar
    xdgmime: Fix an invalid read · be7f4018
    Kalev Lember authored
    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
    be7f4018
Name
Last commit
Last update
build Loading commit data...
docs Loading commit data...
gio Loading commit data...
glib Loading commit data...
gmodule Loading commit data...
gobject Loading commit data...
gthread Loading commit data...
m4macros Loading commit data...
po Loading commit data...
tests Loading commit data...
.dir-locals.el Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
ChangeLog.pre-1-2 Loading commit data...
ChangeLog.pre-2-0 Loading commit data...
ChangeLog.pre-2-10 Loading commit data...
ChangeLog.pre-2-12 Loading commit data...
ChangeLog.pre-2-14 Loading commit data...
ChangeLog.pre-2-16 Loading commit data...
ChangeLog.pre-2-18 Loading commit data...
ChangeLog.pre-2-2 Loading commit data...
ChangeLog.pre-2-20 Loading commit data...
ChangeLog.pre-2-4 Loading commit data...
ChangeLog.pre-2-6 Loading commit data...
ChangeLog.pre-2-8 Loading commit data...
HACKING Loading commit data...
INSTALL.in Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
NEWS.pre-1-3 Loading commit data...
README.commits Loading commit data...
README.in Loading commit data...
README.win32 Loading commit data...
acglib.m4 Loading commit data...
acinclude.m4 Loading commit data...
autogen.sh Loading commit data...
check-abis.sh Loading commit data...
config.h.win32.in Loading commit data...
configure.ac Loading commit data...
gio-2.0.pc.in Loading commit data...
gio-unix-2.0.pc.in Loading commit data...
gio-windows-2.0.pc.in Loading commit data...
glib-2.0.pc.in Loading commit data...
glib-gettextize.in Loading commit data...
glib-tap.mk Loading commit data...
glib-zip.in Loading commit data...
glib.doap Loading commit data...
glib.mk Loading commit data...
gmodule-2.0.pc.in Loading commit data...
gmodule-export-2.0.pc.in Loading commit data...
gmodule-no-export-2.0.pc.in Loading commit data...
gobject-2.0.pc.in Loading commit data...
gthread-2.0.pc.in Loading commit data...
makefile.msc Loading commit data...
msvc_recommended_pragmas.h Loading commit data...
sanity_check Loading commit data...
tap-test Loading commit data...
win32-fixup.pl Loading commit data...