diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libc/net/ethers.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/libc/net/ethers.c b/src/lib/libc/net/ethers.c index 1124e43253..2c8328a9ba 100644 --- a/src/lib/libc/net/ethers.c +++ b/src/lib/libc/net/ethers.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ethers.c,v 1.11 2000/08/22 19:04:41 deraadt Exp $ */ | 1 | /* $OpenBSD: ethers.c,v 1.12 2001/06/27 00:58:54 lebel Exp $ */ |
| 2 | 2 | ||
| 3 | /* | 3 | /* |
| 4 | * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> | 4 | * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> |
| @@ -34,7 +34,7 @@ | |||
| 34 | */ | 34 | */ |
| 35 | 35 | ||
| 36 | #if defined(LIBC_SCCS) && !defined(lint) | 36 | #if defined(LIBC_SCCS) && !defined(lint) |
| 37 | static char rcsid[] = "$OpenBSD: ethers.c,v 1.11 2000/08/22 19:04:41 deraadt Exp $"; | 37 | static char rcsid[] = "$OpenBSD: ethers.c,v 1.12 2001/06/27 00:58:54 lebel Exp $"; |
| 38 | #endif /* LIBC_SCCS and not lint */ | 38 | #endif /* LIBC_SCCS and not lint */ |
| 39 | 39 | ||
| 40 | #include <sys/types.h> | 40 | #include <sys/types.h> |
| @@ -263,8 +263,7 @@ ether_line(line, e, hostname) | |||
| 263 | n = strcspn(p, " \t\n"); | 263 | n = strcspn(p, " \t\n"); |
| 264 | if (n >= MAXHOSTNAMELEN) | 264 | if (n >= MAXHOSTNAMELEN) |
| 265 | goto bad; | 265 | goto bad; |
| 266 | (void)strncpy(hostname, p, n); | 266 | strlcpy(hostname, p, n + 1); |
| 267 | hostname[n] = '\0'; | ||
| 268 | return (0); | 267 | return (0); |
| 269 | 268 | ||
| 270 | bad: | 269 | bad: |
