Changeset 87830 in webkit


Ignore:
Timestamp:
Jun 1, 2011, 11:38:35 AM (14 years ago)
Author:
xan@webkit.org
Message:

2011-06-01 Xan Lopez <xlopez@igalia.com>

Reviewed by Martin Robinson.

Explictly request the size of a pointer in malloc. Otherwise this
explodes in 64bit architectures, at least.

  • webkit/webkitwebplugin.cpp: (webkit_web_plugin_get_mimetypes): ditto.
Location:
trunk/Source/WebKit/gtk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/gtk/ChangeLog

    r87823 r87830  
     12011-06-01  Xan Lopez  <xlopez@igalia.com>
     2
     3        Reviewed by Martin Robinson.
     4
     5        Explictly request the size of a pointer in malloc. Otherwise this
     6        explodes in 64bit architectures, at least.
     7
     8        * webkit/webkitwebplugin.cpp:
     9        (webkit_web_plugin_get_mimetypes): ditto.
     10
    1112011-06-01  Xan Lopez  <xlopez@igalia.com>
    212
  • trunk/Source/WebKit/gtk/webkit/webkitwebplugin.cpp

    r83185 r87830  
    242242
    243243        Vector<String> extensions = priv->corePlugin->mimeToExtensions().get(it->first);
    244         mimeType->extensions = static_cast<gchar**>(g_malloc0(extensions.size() + 1));
     244        mimeType->extensions = static_cast<gchar**>(g_malloc0(sizeof(char*) * (extensions.size() + 1)));
    245245        for (unsigned i = 0; i < extensions.size(); i++)
    246246            mimeType->extensions[i] = g_strdup(extensions[i].utf8().data());
Note: See TracChangeset for help on using the changeset viewer.