[gnome-shell] browser-plugin: Fix installation on WebKit-like browsers



commit 54afb7b25ebf6a2b399c575404d25b511e5b7aaf
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Sun Dec 18 05:21:05 2011 -0500

    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 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/browser-plugin/browser-plugin.c b/browser-plugin/browser-plugin.c
index a80a492..799d863 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;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]