mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-05 10:38:08 +01:00
Merge branch 'backport-1085-xdgmime-glib-2-62' into 'glib-2-62'
Backport !1085 “xdgmime: Prevent infinite loops from badly-formed MIME registrations” to glib-2-62 See merge request GNOME/glib!1103
This commit is contained in:
commit
e2e51082be
@ -965,7 +965,9 @@ _xdg_mime_cache_mime_type_subclass (const char *mime,
|
|||||||
for (j = 0; j < n_parents; j++)
|
for (j = 0; j < n_parents; j++)
|
||||||
{
|
{
|
||||||
parent_offset = GET_UINT32 (cache->buffer, offset + 4 + 4 * j);
|
parent_offset = GET_UINT32 (cache->buffer, offset + 4 + 4 * j);
|
||||||
if (_xdg_mime_cache_mime_type_subclass (cache->buffer + parent_offset, ubase))
|
if (strcmp (cache->buffer + parent_offset, mime) != 0 &&
|
||||||
|
strcmp (cache->buffer + parent_offset, umime) != 0 &&
|
||||||
|
_xdg_mime_cache_mime_type_subclass (cache->buffer + parent_offset, ubase))
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user