diff options
Diffstat (limited to 'ident.c')
-rw-r--r-- | ident.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -101,7 +101,7 @@ static int canonical_name(const char *host, struct strbuf *out) memset (&hints, '\0', sizeof (hints)); hints.ai_flags = AI_CANONNAME; if (!getaddrinfo(host, NULL, &hints, &ai)) { - if (ai && strchr(ai->ai_canonname, '.')) { + if (ai && ai->ai_canonname && strchr(ai->ai_canonname, '.')) { strbuf_addstr(out, ai->ai_canonname); status = 0; } |