diff options
author | Linus Nordberg <linus@nordu.net> | 2016-10-17 08:52:33 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2017-08-02 13:09:43 +0200 |
commit | 32d58a5276927892c16f17b3f5676fa0a067c19a (patch) | |
tree | 01ff59959dda74195e96aa4d36b97ecd558324cf /hostport.c | |
parent | 950306fca00af2ea68f21e7873a227694559cb95 (diff) |
Don't follow the NULL pointer, not even in debug printouts.
Bug reported by Leonhard Knauff.
Closes RADSECPROXY-68.
Diffstat (limited to 'hostport.c')
-rw-r--r-- | hostport.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -172,7 +172,10 @@ int resolvehostport(struct hostportres *hp, int af, int socktype, uint8_t passiv } } } - debug(DBG_DBG, "%s: %s -> %s", __func__, hp->host, addr2string(hp->addrinfo->ai_addr)); + debug(DBG_DBG, "%s: %s -> %s", __func__, + (hp->host ? hp->host : "(src info not available)"), + ((hp->addrinfo && hp->addrinfo->ai_addr) ? + addr2string(hp->addrinfo->ai_addr) : "(dst info not available)")); return 1; errexit: |