2009/4/29 Alex Riesen [off-list ref]:
2009/4/29 Augie Fackler [off-list ref]:
quoted
@@ -459,7 +459,10 @@ static void parse_extra_args(char *extra_args, int
buflen)
inet_ntop(AF_INET, &sin_addr->sin_addr,
addrbuf, sizeof(addrbuf));
free(canon_hostname);
- canon_hostname = xstrdup(ai->ai_canonname);
+ if (ai->ai_canonname)
+ canon_hostname =
xstrdup(ai->ai_canonname);
+ else
+ canon_hostname = "unknown";
This last line will crash some lines down, when canon_hostname is free'd:
Actually, it will crash in the line just above. On the same reasons.