diff options
Diffstat (limited to 'common.c')
-rw-r--r-- | common.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1689,6 +1689,8 @@ xssl_get_error (SSL *ssl, int result, const char **error_info) static char * format_host_port_pair (const char *host, const char *port) { + if (!host) + host = ""; // IPv6 addresses mess with the "colon notation"; let's go with RFC 2732 if (strchr (host, ':')) return xstrdup_printf ("[%s]:%s", host, port); |