3ab4b863e7
from uwe
22 lines
1017 B
Plaintext
22 lines
1017 B
Plaintext
$OpenBSD: patch-tunip_c,v 1.3 2005/11/11 19:38:07 sturm Exp $
|
|
--- tunip.c.orig Thu May 5 12:25:00 2005
|
|
+++ tunip.c Fri Nov 4 00:09:30 2005
|
|
@@ -436,7 +436,7 @@ int update_sa_addr(struct sa_desc *p)
|
|
if (new_addr.sin_addr.s_addr != p->source.sin_addr.s_addr) {
|
|
char addr1[16];
|
|
p->source.sin_addr = new_addr.sin_addr;
|
|
- strcpy(addr1, inet_ntoa(p->dest.sin_addr));
|
|
+ strlcpy(addr1, inet_ntoa(p->dest.sin_addr), sizeof(addr1));
|
|
syslog(LOG_NOTICE,
|
|
"local address for %s is %s", addr1, inet_ntoa(p->source.sin_addr));
|
|
return 1;
|
|
@@ -844,7 +844,7 @@ static void vpnc_main_loop(struct peer_d
|
|
|| from.sin_addr.s_addr != peer->remote_sa->dest.sin_addr.s_addr) {
|
|
/* remote end changed address */
|
|
char addr1[16];
|
|
- strcpy(addr1, inet_ntoa(peer->remote_sa->dest.sin_addr));
|
|
+ strlcpy(addr1, inet_ntoa(peer->remote_sa->dest.sin_addr), sizeof(addr1));
|
|
syslog(LOG_NOTICE,
|
|
"spi %u: remote address changed from %s to %s",
|
|
peer->remote_sa->spi, addr1, inet_ntoa(from.sin_addr));
|