From 54afb7b25ebf6a2b399c575404d25b511e5b7aaf Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sun, 18 Dec 2011 05:21:05 -0500 Subject: [PATCH] browser-plugin: Fix installation on WebKit-like browsers I missed this use of raw UTF8Characters last time. Hopefully this should be the last fix required for WebKit support. https://bugzilla.gnome.org/show_bug.cgi?id=666444 --- browser-plugin/browser-plugin.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/browser-plugin/browser-plugin.c b/browser-plugin/browser-plugin.c index a80a4924f..799d86375 100644 --- a/browser-plugin/browser-plugin.c +++ b/browser-plugin/browser-plugin.c @@ -479,17 +479,22 @@ plugin_install_extension (PluginObject *obj, NPString version_tag) { gchar *uuid_str = g_strndup (uuid.UTF8Characters, uuid.UTF8Length); + gchar *version_tag_str; + if (!uuid_is_valid (uuid_str)) { g_free (uuid_str); return FALSE; } + version_tag_str = g_strndup (version_tag.UTF8Characters, + version_tag.UTF8Length); + g_dbus_proxy_call (obj->proxy, "InstallRemoteExtension", g_variant_new ("(ss)", uuid_str, - version_tag.UTF8Characters), + version_tag_str), G_DBUS_CALL_FLAGS_NONE, -1, /* timeout */ NULL, /* cancellable */ @@ -497,6 +502,7 @@ plugin_install_extension (PluginObject *obj, NULL /* user_data */); g_free (uuid_str); + g_free (version_tag_str); return TRUE; }