diff options
author | Michael Catanzaro <mcatanzaro@igalia.com> | 2018-05-22 21:06:32 -0500 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@igalia.com> | 2018-05-22 21:10:26 -0500 |
commit | 4f4eb2c353cf038daac01dd91473907b93adda93 (patch) | |
tree | f2324298d8d6a898009d600c845b5bc413dc047a | |
parent | 08fbe8cdc229d1d504079fdbeaa521f39833b4dc (diff) | |
download | epiphany-4f4eb2c353cf038daac01dd91473907b93adda93.tar.gz |
session: Fix crash when JS opens an invalid URI
https://bugzilla.gnome.org/show_bug.cgi?id=795740
-rw-r--r-- | 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 8a86ceaaa..532930e05 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; |