diff options
author | Rupert Swarbrick <rswarbrick@gmail.com> | 2010-06-10 00:34:22 +0100 |
---|---|---|
committer | Shaun McCance <shaunm@gnome.org> | 2010-06-10 08:57:37 -0500 |
commit | 78f0d500bae2d95e29d09a1571aff7adf4a830be (patch) | |
tree | 4a6c9ec9e84cc09bd668180ef69f2be76fe64acd /libyelp/yelp-uri.h | |
parent | 8c60d0b4a158668202b4fde5c559d654c1afb7aa (diff) | |
download | yelp-78f0d500bae2d95e29d09a1571aff7adf4a830be.tar.gz |
Don't segfault on http:// uri's.
This was caused by uri's that came out as
YELP_URI_DOCUMENT_TYPE_EXTERNAL getting a document_uri of NULL. Then
this got inserted into several hashtables, whose hash function
required (non-null) strings.
A fix is to use the canonical uri if document_uri is NULL.
Diffstat (limited to 'libyelp/yelp-uri.h')
-rw-r--r-- | libyelp/yelp-uri.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libyelp/yelp-uri.h b/libyelp/yelp-uri.h index 81612619..13aa73bb 100644 --- a/libyelp/yelp-uri.h +++ b/libyelp/yelp-uri.h @@ -73,6 +73,8 @@ void yelp_uri_resolve (YelpUri *uri); gboolean yelp_uri_is_resolved (YelpUri *uri); YelpUriDocumentType yelp_uri_get_document_type (YelpUri *uri); +/* Both of these functions return a non-null answer, provided that + * the uri has been resolved. */ gchar * yelp_uri_get_canonical_uri (YelpUri *uri); gchar * yelp_uri_get_document_uri (YelpUri *uri); |