From e133d3eb3b88a711bfd3b297fc1174f465491956 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Mon, 12 Sep 2011 01:32:24 +0200 Subject: ephy-web-view: SoupURI construction can fail for invalid URIs Guard against that. --- embed/ephy-web-view.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'embed/ephy-web-view.c') diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c index 102ac2424..cc5e61ecc 100644 --- a/embed/ephy-web-view.c +++ b/embed/ephy-web-view.c @@ -1908,7 +1908,8 @@ load_status_cb (WebKitWebView *web_view, /* FIXME: It sucks to do this here, but it's not really possible * to hook the DOM actions nicely in the about: generator. */ uri = soup_uri_new (webkit_web_view_get_uri (web_view)); - if (!g_strcmp0 (uri->scheme, "ephy-about") && + if (uri && + !g_strcmp0 (uri->scheme, "ephy-about") && !g_strcmp0 (uri->path, "applications")) { WebKitDOMDocument *document; WebKitDOMNodeList *buttons; @@ -1928,7 +1929,8 @@ load_status_cb (WebKitWebView *web_view, NULL); } - soup_uri_free (uri); + if (uri) + soup_uri_free (uri); } break; -- cgit