2ab61c64c1
inputs and ok naddy@
31 lines
904 B
Plaintext
31 lines
904 B
Plaintext
$OpenBSD: patch-src_ip_c,v 1.1 2005/07/21 15:16:47 aanriot Exp $
|
|
--- src/ip.c.orig Tue Feb 8 06:50:02 2005
|
|
+++ src/ip.c Fri Jul 15 12:24:01 2005
|
|
@@ -344,7 +344,7 @@ if ((iaddr.s_addr = inet_addr(ipaddress)
|
|
|
|
if ((hp == NULL) || (hp->h_name == NULL))
|
|
{
|
|
- strcpy(hostbuffer,"(Non registered IP)");
|
|
+ (void)strlcpy(hostbuffer,"(Non registered IP)",sizeof(hostbuffer));
|
|
return hostbuffer;
|
|
}
|
|
|
|
@@ -352,7 +352,7 @@ if ((iaddr.s_addr = inet_addr(ipaddress)
|
|
}
|
|
else
|
|
{
|
|
- strcpy(hostbuffer,"(non registered IP)");
|
|
+ (void)strlcpy(hostbuffer,"(non registered IP)",sizeof(hostbuffer));
|
|
}
|
|
|
|
#endif
|
|
@@ -541,7 +541,7 @@ while (dbcp->c_get(dbcp, &key, &value, D
|
|
time_t then;
|
|
|
|
memcpy(&then,value.data,sizeof(then));
|
|
- strcpy(hostname,(char *)key.data);
|
|
+ (void)strlcpy(hostname,(char *)key.data,sizeof(hostname));
|
|
|
|
if (value.data != NULL)
|
|
{
|