Diff
Modified: trunk/Source/ThirdParty/ChangeLog (233906 => 233907)
--- trunk/Source/ThirdParty/ChangeLog 2018-07-18 05:14:25 UTC (rev 233906)
+++ trunk/Source/ThirdParty/ChangeLog 2018-07-18 06:08:36 UTC (rev 233907)
@@ -1,3 +1,19 @@
+2018-07-17 Michael Catanzaro <[email protected]>
+
+ [WPE][GTK] Update xdgmime
+ https://bugs.webkit.org/show_bug.cgi?id=187727
+
+ Reviewed by Carlos Garcia Campos.
+
+ * xdgmime/README:
+ * xdgmime/README.webkit:
+ * xdgmime/src/xdgmime.c:
+ (_xdg_mime_mime_type_subclass):
+ * xdgmime/src/xdgmimecache.c:
+ (_xdg_mime_cache_new_from_file):
+ (_xdg_mime_cache_get_mime_type_for_file):
+ (_xdg_mime_cache_mime_type_subclass):
+
2018-07-03 Michael Catanzaro <[email protected]>
[WPE][GTK] Another memory issue in xdgmime
Modified: trunk/Source/ThirdParty/xdgmime/README (233906 => 233907)
--- trunk/Source/ThirdParty/xdgmime/README 2018-07-18 05:14:25 UTC (rev 233906)
+++ trunk/Source/ThirdParty/xdgmime/README 2018-07-18 06:08:36 UTC (rev 233907)
@@ -1,5 +1,5 @@
This module is a simple module that parses the proposed MIME spec listed
-at http://freedesktop.org/. It is currently targetted at version 0.12.
+at http://freedesktop.org/. It is currently targeted at version 0.12.
There are no formal releases planned for this module, and it is not
intended to be installed at this time. Rather, it is meant to be used
by other libraries or applications to add support for the MIME system.
Modified: trunk/Source/ThirdParty/xdgmime/README.webkit (233906 => 233907)
--- trunk/Source/ThirdParty/xdgmime/README.webkit 2018-07-18 05:14:25 UTC (rev 233906)
+++ trunk/Source/ThirdParty/xdgmime/README.webkit 2018-07-18 06:08:36 UTC (rev 233907)
@@ -4,7 +4,7 @@
xdgmime is the reference implementation of the Freedesktop.org MIME specification:
https://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec/
-Current version is based on revision 9c5802b8da56187c5c6abaf70042d14b12d832a9
+Current version is based on revision e70017739ff7643bf2dbbfc8524562cb6ee450ed
cloned from git://anongit.freedesktop.org/xdg/xdgmime.
Changes for the WebKit project:
@@ -11,14 +11,3 @@
- Add xdg_mime_get_simple_globs
- s/^#include <config.h>/#include "cmakeconfig.h"/g
- - Fix invalid pointer arithmetic: https://bugs.webkit.org/show_bug.cgi?id=171026
-
-Changes included from GLib sources:
-
- - 2542b6f60492fadfb21f2c4a29976c3494c7e6c5 xdgmime: Handle EINTR in open()
- - 83d34f630939aa13539e03895bef87da738c4127 Don't forget to free resources in an early return
- - be7f40185fb2ce884112c1f8a4b196ea65350466 xdgmime: Fix an invalid read
-
-Changes included from Chromium:
-
- - c432cac0a0beb77c63081536fc9d53b40e642cbf small patch that fixes potential crash in xdg_mime_get_mime_type_for_file() - use of pointer after being freed.
Modified: trunk/Source/ThirdParty/xdgmime/src/xdgmime.c (233906 => 233907)
--- trunk/Source/ThirdParty/xdgmime/src/xdgmime.c 2018-07-18 05:14:25 UTC (rev 233906)
+++ trunk/Source/ThirdParty/xdgmime/src/xdgmime.c 2018-07-18 06:08:36 UTC (rev 233907)
@@ -793,7 +793,8 @@
strncmp (umime, "text/", 5) == 0)
return 1;
- if (strcmp (ubase, "application/octet-stream") == 0)
+ if (strcmp (ubase, "application/octet-stream") == 0 &&
+ strncmp (umime, "inode/", 6) != 0)
return 1;
parents = _xdg_mime_parent_list_lookup (parent_list, umime);
Modified: trunk/Source/ThirdParty/xdgmime/src/xdgmimecache.c (233906 => 233907)
--- trunk/Source/ThirdParty/xdgmime/src/xdgmimecache.c 2018-07-18 05:14:25 UTC (rev 233906)
+++ trunk/Source/ThirdParty/xdgmime/src/xdgmimecache.c 2018-07-18 06:08:36 UTC (rev 233907)
@@ -121,9 +121,9 @@
int minor;
/* Open the file and map it into memory */
- do
+ do {
fd = open (file_name, O_RDONLY|_O_BINARY, 0);
- while (fd == -1 && errno == EINTR);
+ } while (fd == -1 && errno == EINTR);
if (fd < 0)
return NULL;
@@ -788,7 +788,7 @@
mime_types, n);
if (!mime_type)
- mime_type = _xdg_binary_or_text_fallback(data, bytes_read);
+ mime_type = _xdg_binary_or_text_fallback (data, bytes_read);
free (data);
fclose (file);
@@ -870,7 +870,8 @@
strncmp (umime, "text/", 5) == 0)
return 1;
- if (strcmp (ubase, "application/octet-stream") == 0)
+ if (strcmp (ubase, "application/octet-stream") == 0 &&
+ strncmp (umime, "inode/", 6) != 0)
return 1;
for (i = 0; _caches[i]; i++)