Commit 77fecaaf authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(isc_getipnum): Use the entire hostname buffer.

parent 5d085601
......@@ -173,12 +173,12 @@ char *isc_getipnum(IscAddress *ia, char *buf, int len)
if (!buf)
{
buf = hostname;
len = sizeof(hostname)-1;
len = sizeof(hostname);
}
addr = (struct sockaddr_in *) &ia->ip.saddr;
strncpy(buf, inet_ntoa(addr->sin_addr), len);
strncpy(buf, inet_ntoa(addr->sin_addr), len-1);
buf[len] = '\0';
return buf;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment