diff options
author | Jan-Michael Brummer <jan.brummer@tabos.org> | 2023-05-12 16:13:12 +0200 |
---|---|---|
committer | Jan-Michael Brummer <jan.brummer@tabos.org> | 2023-05-12 16:18:42 +0200 |
commit | 78e1a94ae1298ec3a25261b0db96c7e8f2566512 (patch) | |
tree | 08ff7ae6000b03e1eeaf2043d0bb38925cc28e3a /src | |
parent | 66a5f49826b4c9678a7c3003f7a57079df931adc (diff) | |
download | libproxy-git-fix-ignore-check.tar.gz |
Check for valid uri_host in ignore_ip()fix-ignore-check
Fixes: https://github.com/libproxy/libproxy/issues/208
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/px-manager.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/backend/px-manager.c b/src/backend/px-manager.c index 4a54352..df4bda1 100644 --- a/src/backend/px-manager.c +++ b/src/backend/px-manager.c @@ -668,12 +668,16 @@ ignore_ip (GUri *uri, GInetAddress *inet_address1; GInetAddress *inet_address2; g_auto (GStrv) ignore_split = NULL; - gboolean is_ip1 = g_hostname_is_ip_address (g_uri_get_host (uri)); + const char *uri_host = g_uri_get_host (uri); + gboolean is_ip1 = FALSE; gboolean is_ip2 = g_hostname_is_ip_address (ignore); int port = g_uri_get_port (uri); int ig_port = -1; gboolean result; + if (uri_host) + is_ip1 = g_hostname_is_ip_address (uri_host); + /* * IPv4 * IPv6 @@ -704,6 +708,7 @@ ignore_ip (GUri *uri, return port != -1 ? ((port == ig_port) && result) : result; } + gboolean px_manager_is_ignore (GUri *uri, GStrv ignores) |