Changeset 233907 in webkit


Ignore:
Timestamp:
Jul 17, 2018 11:08:36 PM (6 years ago)
Author:
Michael Catanzaro
Message:

[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):

Location:
trunk/Source/ThirdParty
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/ThirdParty/ChangeLog

    r233457 r233907  
     12018-07-17  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        [WPE][GTK] Update xdgmime
     4        https://bugs.webkit.org/show_bug.cgi?id=187727
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        * xdgmime/README:
     9        * xdgmime/README.webkit:
     10        * xdgmime/src/xdgmime.c:
     11        (_xdg_mime_mime_type_subclass):
     12        * xdgmime/src/xdgmimecache.c:
     13        (_xdg_mime_cache_new_from_file):
     14        (_xdg_mime_cache_get_mime_type_for_file):
     15        (_xdg_mime_cache_mime_type_subclass):
     16
    1172018-07-03  Michael Catanzaro  <mcatanzaro@igalia.com>
    218
  • trunk/Source/ThirdParty/xdgmime/README

    r214339 r233907  
    11This module is a simple module that parses the proposed MIME spec listed
    2 at http://freedesktop.org/.  It is currently targetted at version 0.12.
     2at http://freedesktop.org/.  It is currently targeted at version 0.12.
    33There are no formal releases planned for this module, and it is not
    44intended to be installed at this time.  Rather, it is meant to be used
  • trunk/Source/ThirdParty/xdgmime/README.webkit

    r233457 r233907  
    55https://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec/
    66
    7 Current version is based on revision 9c5802b8da56187c5c6abaf70042d14b12d832a9
     7Current version is based on revision e70017739ff7643bf2dbbfc8524562cb6ee450ed
    88cloned from git://anongit.freedesktop.org/xdg/xdgmime.
    99
     
    1212 - Add xdg_mime_get_simple_globs
    1313 - s/^#include <config.h>/#include "cmakeconfig.h"/g
    14  - Fix invalid pointer arithmetic: https://bugs.webkit.org/show_bug.cgi?id=171026
    15 
    16 Changes included from GLib sources:
    17 
    18  - 2542b6f60492fadfb21f2c4a29976c3494c7e6c5 xdgmime: Handle EINTR in open()
    19  - 83d34f630939aa13539e03895bef87da738c4127 Don't forget to free resources in an early return
    20  - be7f40185fb2ce884112c1f8a4b196ea65350466 xdgmime: Fix an invalid read
    21 
    22 Changes 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.
  • trunk/Source/ThirdParty/xdgmime/src/xdgmime.c

    r233457 r233907  
    794794    return 1;
    795795
    796   if (strcmp (ubase, "application/octet-stream") == 0)
     796  if (strcmp (ubase, "application/octet-stream") == 0 &&
     797      strncmp (umime, "inode/", 6) != 0)
    797798    return 1;
    798799 
  • trunk/Source/ThirdParty/xdgmime/src/xdgmimecache.c

    r233404 r233907  
    122122
    123123  /* Open the file and map it into memory */
    124   do
     124  do {
    125125    fd = open (file_name, O_RDONLY|_O_BINARY, 0);
    126   while (fd == -1 && errno == EINTR);
     126  } while (fd == -1 && errno == EINTR);
    127127
    128128  if (fd < 0)
     
    789789
    790790  if (!mime_type)
    791     mime_type = _xdg_binary_or_text_fallback(data, bytes_read);
     791    mime_type = _xdg_binary_or_text_fallback (data, bytes_read);
    792792
    793793  free (data);
     
    871871    return 1;
    872872
    873   if (strcmp (ubase, "application/octet-stream") == 0)
     873  if (strcmp (ubase, "application/octet-stream") == 0 &&
     874      strncmp (umime, "inode/", 6) != 0)
    874875    return 1;
    875876 
Note: See TracChangeset for help on using the changeset viewer.