summaryrefslogtreecommitdiff
path: root/src/plugins/relay/relay-server.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-01-27 20:47:24 +0100
committerSébastien Helleu <flashcode@flashtux.org>2023-01-28 15:14:22 +0100
commitc07cf691adb4740759e9fd128a2f6702c912d70f (patch)
tree91520d9be1270aae41d23ffeae1f69d3a31b10d2 /src/plugins/relay/relay-server.c
parentc9ac4fef4b7aa054df72bddf667edea0608d39c6 (diff)
downloadweechat-c07cf691adb4740759e9fd128a2f6702c912d70f.zip
core, plugins: check that string parameters are not NULL in search functions (issue #1872)
Diffstat (limited to 'src/plugins/relay/relay-server.c')
-rw-r--r--src/plugins/relay/relay-server.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/relay/relay-server.c b/src/plugins/relay/relay-server.c
index a52eaf74b..e00e3bbaf 100644
--- a/src/plugins/relay/relay-server.c
+++ b/src/plugins/relay/relay-server.c
@@ -170,6 +170,9 @@ relay_server_search (const char *protocol_and_args)
{
struct t_relay_server *ptr_server;
+ if (!protocol_and_args)
+ return NULL;
+
for (ptr_server = relay_servers; ptr_server;
ptr_server = ptr_server->next_server)
{
@@ -213,6 +216,9 @@ relay_server_search_path (const char *path)
{
struct t_relay_server *ptr_server;
+ if (!path)
+ return NULL;
+
for (ptr_server = relay_servers; ptr_server;
ptr_server = ptr_server->next_server)
{