[gnome-shell] browser-plugin: Correct check for checking the hostname/protocol



commit 9400d8f6db8459e53487b42e4152d2232c55e832
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Feb 20 18:23:12 2012 -0500

    browser-plugin: Correct check for checking the hostname/protocol
    
    While it's extremely unlikely that document.location would not be an
    object in the browser setting, this check is incorrect and we could
    possibly crash an NPAPI host if this is the case.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=670489

 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 8f7e876..16fae1c 100644
--- a/browser-plugin/browser-plugin.c
+++ b/browser-plugin/browser-plugin.c
@@ -104,7 +104,7 @@ check_origin_and_protocol (NPP instance)
                           &location))
     goto out;
 
-  if (!NPVARIANT_IS_OBJECT (document))
+  if (!NPVARIANT_IS_OBJECT (location))
     goto out;
 
   hostname = get_string_property (instance,



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