[epiphany/gnome-3-28] session: Fix crash when JS opens an invalid URI
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-28] session: Fix crash when JS opens an invalid URI
- Date: Wed, 23 May 2018 02:11:54 +0000 (UTC)
commit 8c434004c0c5937c948cec6cccd95f547a0c14df
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Tue May 22 21:06:32 2018 -0500
session: Fix crash when JS opens an invalid URI
https://bugzilla.gnome.org/show_bug.cgi?id=795740
src/ephy-session.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/ephy-session.c b/src/ephy-session.c
index 8a86cea..532930e 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -828,8 +828,15 @@ session_seems_sane (GList *windows)
SoupURI *uri;
gboolean sane = FALSE;
+ /* NULL URLs are possible when an invalid URL is opened by JS.
+ * E.g. <script>win = window.open("blah", "WIN");</script>
+ */
+ if (url == NULL)
+ continue;
+
/* Blank URLs can occur in some situations. Just ignore these, as they
- * are harmless and not an indicator of a corrupted session. */
+ * are harmless and not an indicator of a corrupted session.
+ */
if (strcmp (url, "") == 0)
continue;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]