summaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index 46c8fb5fb..335889903 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1686,6 +1686,8 @@ static bool is_ASCII_name(const char *hostname)
static void strip_trailing_dot(struct hostname *host)
{
size_t len;
+ if(!host || !host->name)
+ return;
len = strlen(host->name);
if(len && (host->name[len-1] == '.'))
host->name[len-1] = 0;