[gnome-shell] browser-plugin: Fix enable/disable



commit ad6d9861726dc64480f971da44a1701e3554c01d
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon May 28 19:26:02 2012 -0400

    browser-plugin: Fix enable/disable
    
    This code was broken at the last minute, and an accidentally stale plugin
    copy kept it untested.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=676837

 browser-plugin/browser-plugin.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/browser-plugin/browser-plugin.c b/browser-plugin/browser-plugin.c
index 2676beb..01f335a 100644
--- a/browser-plugin/browser-plugin.c
+++ b/browser-plugin/browser-plugin.c
@@ -515,9 +515,9 @@ plugin_enable_extension (PluginObject *obj,
   if (enabled)
     {
       new_uuids = g_new (const gchar *, length + 2); /* New key, NULL */
-      memcpy (new_uuids, uuids, length);
-      new_uuids[length - 2] = uuid_str;
-      new_uuids[length - 1] = NULL;
+      memcpy (new_uuids, uuids, length * sizeof (*new_uuids));
+      new_uuids[length] = uuid_str;
+      new_uuids[length + 1] = NULL;
     }
   else
     {



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