[gnome-shell] browser-plugin: Fix callback for "onchange"



commit 15563444cfd6407831033fcf0d0e21c249fa9ada
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Jan 23 20:57:03 2012 -0500

    browser-plugin: Fix callback for "onchange"
    
    In the case that calling the listener fails, "result" may be uninitialized.
    Sending NPAPI uninitialized memory is never a good idea.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=668517

 browser-plugin/browser-plugin.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/browser-plugin/browser-plugin.c b/browser-plugin/browser-plugin.c
index bd10b7d..da08a05 100644
--- a/browser-plugin/browser-plugin.c
+++ b/browser-plugin/browser-plugin.c
@@ -286,7 +286,7 @@ on_shell_signal (GDBusProxy *proxy,
       gint32 status;
       gchar *error;
       NPVariant args[3];
-      NPVariant result;
+      NPVariant result = { NPVariantType_Void };
 
       g_variant_get (parameters, "(sis)", &uuid, &status, &error);
       STRINGZ_TO_NPVARIANT (uuid, args[0]);



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