hi = hostname_convert(&addr.addr, addr_len);
safe_str(hi ? hi->hostname : "", tbuf1, &bp);
*bp = '\0';
- if (Forbidden_Site(tbuf1) || Forbidden_Site(tbuf2)) {
+ if ((*tbuf1 && Forbidden_Site(tbuf1)) || Forbidden_Site(tbuf2)) {
if (!Deny_Silent_Site(tbuf1, AMBIGUOUS)
|| !Deny_Silent_Site(tbuf2, AMBIGUOUS)) {
do_log(LT_CONN, 0, 0, "[%d/%s/%s] %s (%s %s)", newsock, tbuf1, tbuf2,
if ((bp2 = strchr(buf, '^'))) {
*bp2++ = '\0';
/* buf is ip addr, bp is local port^ident info */
- if ((bp = strchr(bp2, '^')))
+ if ((bp = strchr(bp2, '^'))) {
*bp++ = '\0';
+ if (!*bp)
+ bp = NULL;
+ }
}
/* Now, either buf = ipaddr, bp2 = port, bp = ident info,
* or buf = ipaddr, bp2 = port