From a11a4f2961738fbc597d02db9bf525f30b19e2a4d3db2eba0fdd67c2b08f6f78 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 3 Aug 2016 11:25:55 +0000 Subject: [PATCH] Accepting request 415711 from home:Zaitor:branches:GNOME:Factory Yet a resub, save other changes for 3.22 (most are done anyway there. Keep rebase as small as possible). OBS-URL: https://build.opensuse.org/request/show/415711 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/epiphany?expand=0&rev=226 --- epiphany-embed-Check-for-NULL-SoupURI.patch | 39 +++++++++++++++++++++ epiphany.changes | 6 ++++ epiphany.spec | 3 ++ 3 files changed, 48 insertions(+) create mode 100644 epiphany-embed-Check-for-NULL-SoupURI.patch diff --git a/epiphany-embed-Check-for-NULL-SoupURI.patch b/epiphany-embed-Check-for-NULL-SoupURI.patch new file mode 100644 index 0000000..24651fb --- /dev/null +++ b/epiphany-embed-Check-for-NULL-SoupURI.patch @@ -0,0 +1,39 @@ +From 9573c6efe61fe91b055e66ee7928bfe0e2b3bc0a Mon Sep 17 00:00:00 2001 +From: Carlos Garnacho +Date: Thu, 30 Jun 2016 16:45:13 +0200 +Subject: embed: Check for NULL SoupURI when trying to load invalid url + +Fixes crashes when accessing soup_uri memory. If there is no valid +uri, just set the "local page" security level. + +https://bugzilla.gnome.org/show_bug.cgi?id=768250 +--- + embed/ephy-web-view.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c +index 73166bc..40af96a 100644 +--- a/embed/ephy-web-view.c ++++ b/embed/ephy-web-view.c +@@ -1427,7 +1427,7 @@ update_security_status_for_committed_load (EphyWebView *view, + g_clear_object (&view->certificate); + g_clear_pointer (&view->tls_error_failing_uri, g_free); + +- if (webkit_security_manager_uri_scheme_is_local (security_manager, soup_uri->scheme)) { ++ if (!soup_uri || webkit_security_manager_uri_scheme_is_local (security_manager, soup_uri->scheme)) { + security_level = EPHY_SECURITY_LEVEL_LOCAL_PAGE; + } else if (webkit_web_view_get_tls_info (WEBKIT_WEB_VIEW (view), &view->certificate, &view->tls_errors)) { + g_object_ref (view->certificate); +@@ -1439,7 +1439,8 @@ update_security_status_for_committed_load (EphyWebView *view, + + ephy_web_view_set_security_level (view, security_level); + +- soup_uri_free (soup_uri); ++ if (soup_uri) ++ soup_uri_free (soup_uri); + } + + static void +-- +cgit v0.12 + diff --git a/epiphany.changes b/epiphany.changes index 7907bd0..16746f1 100644 --- a/epiphany.changes +++ b/epiphany.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jul 28 18:26:08 UTC 2016 - zaitor@opensuse.org + +- Add epiphany-embed-Check-for-NULL-SoupURI.patch: Fixes crashes + when accessing soup_uri memory (bgo#768250). + ------------------------------------------------------------------- Mon Jun 20 19:20:21 UTC 2016 - zaitor@opensuse.org diff --git a/epiphany.spec b/epiphany.spec index 8580e86..9b07ccc 100644 --- a/epiphany.spec +++ b/epiphany.spec @@ -27,6 +27,8 @@ Url: http://www.gnome.org/projects/epiphany/ Source: http://download.gnome.org/sources/epiphany/3.20/%{name}-%{version}.tar.xz # PATCH-FEATURE-OPENSUSE epiphany-safe-one-click-install.patch bnc330070 vuntz@novell.com -- Make one-click install work with one-click Patch0: epiphany-safe-one-click-install.patch +# PATCH-FIX-UPSTREAM epiphany-embed-Check-for-NULL-SoupURI.patch bgo#768250 zaitor@opensuse.org -- Fixes crashes when accessing soup_uri memory. +Patch1: epiphany-embed-Check-for-NULL-SoupURI.patch # The icon we rely on is from adwaita-icon-theme BuildRequires: adwaita-icon-theme BuildRequires: fdupes @@ -117,6 +119,7 @@ search results from Web (epiphany) %setup -q translation-update-upstream %patch0 -p1 +%patch1 -p1 %build %configure \