summaryrefslogtreecommitdiffstats
path: root/whois.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 06:12:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 06:12:55 +0000
commit079470b3369266a6c170e988bce98dcad951673f (patch)
treea7f6b6d3fc9723f2f53018fbf8b0a5ffc5ba7d96 /whois.c
parentAdding debian version 5.5.21. (diff)
downloadwhois-079470b3369266a6c170e988bce98dcad951673f.tar.xz
whois-079470b3369266a6c170e988bce98dcad951673f.zip
Merging upstream version 5.5.22.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--whois.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/whois.c b/whois.c
index 18a4b5c..1afe313 100644
--- a/whois.c
+++ b/whois.c
@@ -347,7 +347,7 @@ int handle_query(const char *hserver, const char *hport,
sockfd = openconn(server + 1, NULL);
free(server);
server = query_crsnic(sockfd, query);
- if (no_recursion)
+ if (no_recursion && server)
server[0] = '\0';
break;
case 8:
@@ -356,7 +356,7 @@ int handle_query(const char *hserver, const char *hport,
sockfd = openconn(server + 1, NULL);
free(server);
server = query_afilias(sockfd, query);
- if (no_recursion)
+ if (no_recursion && server)
server[0] = '\0';
break;
case 0x0A: