Source/ThirdParty/ChangeLog

 12018-07-02 Michael Catanzaro <mcatanzaro@igalia.com>
 2
 3 [WPE][GTK] Another memory issue in xdgmime
 4 https://bugs.webkit.org/show_bug.cgi?id=187239
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Sync the end of xdg_mime_get_mime_type_for_file() with _xdg_mime_cache_get_mime_type_for_file()
 9 to avoid a memory issue.
 10
 11 I'm pretty sure this code is never executed by either Chromium or WebKit, but I'm not
 12 comfortable with leaving it broken.
 13
 14 * xdgmime/README.webkit:
 15 * xdgmime/src/xdgmime.c:
 16 (xdg_mime_get_mime_type_for_file):
 17
1182018-06-30 Michael Catanzaro <mcatanzaro@igalia.com>
219
320 Fix off-by-one error in xdg_mime_get_simple_globs

Source/ThirdParty/xdgmime/README.webkit

@@Changes included from GLib sources:
1818 - 2542b6f60492fadfb21f2c4a29976c3494c7e6c5 xdgmime: Handle EINTR in open()
1919 - 83d34f630939aa13539e03895bef87da738c4127 Don't forget to free resources in an early return
2020 - be7f40185fb2ce884112c1f8a4b196ea65350466 xdgmime: Fix an invalid read
 21
 22Changes included from Chromium:
 23
 24 - c432cac0a0beb77c63081536fc9d53b40e642cbf small patch that fixes potential crash in xdg_mime_get_mime_type_for_file() - use of pointer after being freed.

Source/ThirdParty/xdgmime/src/xdgmime.c

@@xdg_mime_get_mime_type_for_file (const char *file_name,
558558 mime_type = _xdg_mime_magic_lookup_data (global_magic, data, bytes_read, NULL,
559559 mime_types, n);
560560
 561 if (!mime_type)
 562 mime_type = _xdg_binary_or_text_fallback (data, bytes_read);
 563
561564 free (data);
562565 fclose (file);
563566
564  if (mime_type)
565  return mime_type;
566 
567  return _xdg_binary_or_text_fallback(data, bytes_read);
 567 return mime_type;
568568}
569569
570570const char *