37 lines
1008 B
Diff
37 lines
1008 B
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
|
|
Date: Thu, 29 Jun 2023 14:31:16 +0200
|
|
Subject: [PATCH] Fix crash querying URLs without a host
|
|
|
|
Such as `udp:`.
|
|
|
|
Fixes: https://bugs.archlinux.org/task/78881
|
|
---
|
|
src/backend/px-manager.c | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/src/backend/px-manager.c b/src/backend/px-manager.c
|
|
index 204d51765ae4..dc63b3747eb5 100644
|
|
--- a/src/backend/px-manager.c
|
|
+++ b/src/backend/px-manager.c
|
|
@@ -697,6 +697,9 @@ ignore_domain (GUri *uri,
|
|
if (g_strcmp0 (ignore, "*") == 0)
|
|
return TRUE;
|
|
|
|
+ if (!host)
|
|
+ return FALSE;
|
|
+
|
|
ignore_split = g_strsplit (ignore, ":", -1);
|
|
port = g_uri_get_port (uri);
|
|
|
|
@@ -736,6 +739,9 @@ ignore_hostname (GUri *uri,
|
|
{
|
|
const char *host = g_uri_get_host (uri);
|
|
|
|
+ if (!host)
|
|
+ return FALSE;
|
|
+
|
|
if (g_strcmp0 (ignore, "<local>") == 0 && strchr (host, ':') == NULL && strchr (host, '.') == NULL)
|
|
return TRUE;
|
|
|