diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2015-02-14 07:22:28 +0100 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2015-02-14 07:22:28 +0100 |
commit | 6a9a707a9cc9eddfed909b996e09d624bf657d3c (patch) | |
tree | f257bc3c59c8ed0a8e82624421354560d5fa3000 | |
parent | 781bd247805ff75f568d0224190580a762f44074 (diff) | |
download | xK-6a9a707a9cc9eddfed909b996e09d624bf657d3c.tar.gz xK-6a9a707a9cc9eddfed909b996e09d624bf657d3c.tar.xz xK-6a9a707a9cc9eddfed909b996e09d624bf657d3c.zip |
Avoid null pointer dereference
In irc_listen_resolve() with NULL `host'.
-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); |