From 6a9a707a9cc9eddfed909b996e09d624bf657d3c Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Sat, 14 Feb 2015 07:22:28 +0100 Subject: Avoid null pointer dereference In irc_listen_resolve() with NULL `host'. --- common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common.c b/common.c index 3bbdd78..009d325 100644 --- a/common.c +++ b/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); -- cgit v1.2.3-70-g09d2