GNOME Bugzilla – Bug 588841
crash in get_host_for_message() if uri->host is null
Last modified: 2009-07-17 14:11:53 UTC
After commit dee7dc77 I'm getting a crash in get_host_for_message(), because uri->host is null. When doing g_hash_table_lookup for priv->host it will crash in hash_function (soup_uri_host_hash). uri->host can be null in get_host_for_message when we have an url that follows a 301 redirect to "about:blank", I know it's plain stupid but it is possible.
Created attachment 138573 [details] [review] check uri->host in soup_uri_host_hash return NULL in soup_uri_host_hash() as I do not think scheme + port can be valid. When we have 301 to about:blank scheme = about, port = 0 which is invalid either way.
Ah... about:blank. That's an interesting case. There are various places that assume that get_host_for_message() never returns NULL, so this change isn't right. I fixed this bug in the right place (redirect_handler) at one point (bug 528882), but the fix ended up breaking rhythmbox (bug 553466). But we can make a compromise fix by at least requiring redirect URIs to have a host. *** This bug has been marked as a duplicate of 528882 ***