[epiphany] gsb-utils: Don't crash when handling blob URIs



commit a505a6e21518f0c70d827aa685629dde13f93c27
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Sat Jan 6 17:29:40 2018 -0600

    gsb-utils: Don't crash when handling blob URIs
    
    https://bugzilla.gnome.org/show_bug.cgi?id=788576

 lib/safe-browsing/ephy-gsb-utils.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/lib/safe-browsing/ephy-gsb-utils.c b/lib/safe-browsing/ephy-gsb-utils.c
index 06d6d37..62823a5 100644
--- a/lib/safe-browsing/ephy-gsb-utils.c
+++ b/lib/safe-browsing/ephy-gsb-utils.c
@@ -666,6 +666,12 @@ ephy_gsb_utils_canonicalize (const char  *url,
     return NULL;
   }
 
+  /* Check for e.g. blob or data URIs */
+  if (!uri->host) {
+    soup_uri_free (uri);
+    return NULL;
+  }
+
   /* Remove fragment. */
   soup_uri_set_fragment (uri, NULL);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]