[libsoup/wip/uri-normalize-fixes] Handle potential g_uri_unescape_string failure



commit 8731f0fc861ef44a58d46e895261eaef64e65d9d
Author: Patrick Griffis <pgriffis igalia com>
Date:   Fri Jan 28 10:53:49 2022 -0600

    Handle potential g_uri_unescape_string failure
    
    It is possible that unescaping fails here so use g_strcmp0() which
    is NULL safe.

 libsoup/server/soup-auth-domain-digest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
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;


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