summaryrefslogtreecommitdiff
path: root/browser-plugin
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2012-02-20 18:23:12 -0500
committerJasper St. Pierre <jstpierre@mecheye.net>2012-02-21 04:06:10 -0500
commit9400d8f6db8459e53487b42e4152d2232c55e832 (patch)
treef5332cdbc5645dbeb6793948517d363cec66460c /browser-plugin
parentc7a4b307af93f83d87b41dbf0e5e3387f9e65032 (diff)
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
Diffstat (limited to 'browser-plugin')
-rw-r--r--browser-plugin/browser-plugin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/browser-plugin/browser-plugin.c b/browser-plugin/browser-plugin.c
index 8f7e8769..16fae1ce 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,