summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libsoup/server/soup-auth-domain-digest.c2
-rw-r--r--libsoup/soup-headers.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/libsoup/server/soup-auth-domain-digest.c b/libsoup/server/soup-auth-domain-digest.c
index 4011babf..3a63bc4f 100644
--- a/libsoup/server/soup-auth-domain-digest.c
+++ b/libsoup/server/soup-auth-domain-digest.c
@@ -237,7 +237,7 @@ check_hex_urp (SoupAuthDomain *domain,
req_path = soup_uri_get_path_and_query (req_uri);
dig_path = g_uri_unescape_string (uri, NULL);
- if (strcmp (dig_path, req_path) != 0) {
+ if (g_strcmp0 (dig_path, req_path) != 0) {
g_free (req_path);
g_free (dig_path);
return FALSE;
diff --git a/libsoup/soup-headers.c b/libsoup/soup-headers.c
index fccd0ea9..5485e623 100644
--- a/libsoup/soup-headers.c
+++ b/libsoup/soup-headers.c
@@ -697,6 +697,9 @@ decode_rfc5987 (char *encoded_string)
return FALSE;
decoded = g_uri_unescape_string (q + 1, NULL);
+ if (decoded == NULL)
+ return FALSE;
+
if (iso_8859_1) {
char *utf8 = g_convert_with_fallback (decoded, -1, "UTF-8",
"iso-8859-1", "_",