From 9400d8f6db8459e53487b42e4152d2232c55e832 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Mon, 20 Feb 2012 18:23:12 -0500 Subject: [PATCH] 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 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser-plugin/browser-plugin.c b/browser-plugin/browser-plugin.c index 8f7e87696..16fae1cee 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,