[glib/mcatanzaro/#2597: 21/22] gsimpleproxyresolver: ensure default proxy is valid
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/mcatanzaro/#2597: 21/22] gsimpleproxyresolver: ensure default proxy is valid
- Date: Fri, 17 Jun 2022 17:46:09 +0000 (UTC)
commit 1f97c8ed7c5fdfca66e5adef5b10859ed7692677
Author: Michael Catanzaro <mcatanzaro redhat com>
Date: Mon Jun 13 13:00:01 2022 -0500
gsimpleproxyresolver: ensure default proxy is valid
It should be either a valid URI, or NULL. Passing empty strings or other
invalid URIs is no bueno.
gio/gsimpleproxyresolver.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/gio/gsimpleproxyresolver.c b/gio/gsimpleproxyresolver.c
index 931d974533..8de26cb7b6 100644
--- a/gio/gsimpleproxyresolver.c
+++ b/gio/gsimpleproxyresolver.c
@@ -537,6 +537,7 @@ g_simple_proxy_resolver_set_default_proxy (GSimpleProxyResolver *resolver,
const gchar *default_proxy)
{
g_return_if_fail (G_IS_SIMPLE_PROXY_RESOLVER (resolver));
+ g_return_if_fail (default_proxy == NULL || g_uri_is_valid (default_proxy, G_URI_FLAGS_NONE, NULL));
g_free (resolver->priv->default_proxy);
resolver->priv->default_proxy = g_strdup (default_proxy);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]