Avoid null pointer dereference
In irc_listen_resolve() with NULL `host'.
This commit is contained in:
parent
781bd24780
commit
6a9a707a9c
2
common.c
2
common.c
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue