This commit is contained in:
Damien Miller 2000-09-26 13:13:26 +11:00
parent e772b684cc
commit ecf5830e8a
1 changed files with 3 additions and 3 deletions

View File

@ -25,7 +25,7 @@ int getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
if (strlen(tmpserv) > servlen)
return EAI_MEMORY;
else
strlcpy(serv, tmpserv, servlen);
strcpy(serv, tmpserv);
}
if (host) {
@ -33,7 +33,7 @@ int getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
if (strlen(inet_ntoa(sin->sin_addr)) >= hostlen)
return EAI_MEMORY;
strlcpy(host, inet_ntoa(sin->sin_addr), hostlen);
strcpy(host, inet_ntoa(sin->sin_addr));
return 0;
} else {
hp = gethostbyaddr((char *)&sin->sin_addr,
@ -44,7 +44,7 @@ int getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
if (strlen(hp->h_name) >= hostlen)
return EAI_MEMORY;
strlcpy(host, hp->h_name, hostlen);
strcpy(host, hp->h_name);
return 0;
}
}