summaryrefslogtreecommitdiffstats
path: root/usr.sbin/traceroute
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2015-01-20 18:44:16 +0000
committerflorian <florian@openbsd.org>2015-01-20 18:44:16 +0000
commit1bdf051fda8b701617c46cf5096dffac98e74ee5 (patch)
tree02860238af3bae8c7a2ec77a8ecc55a972eeb5a5 /usr.sbin/traceroute
parentMerge two copies of the (almost) identical bus space code into one file. (diff)
downloadwireguard-openbsd-1bdf051fda8b701617c46cf5096dffac98e74ee5.tar.xz
wireguard-openbsd-1bdf051fda8b701617c46cf5096dffac98e74ee5.zip
HOST_NAME_MAX + 1 is big enough for gethostname(3); this array has
been one char too big when it was defined in terms of MAXHOSTNAMELEN. While here, NI_MAXHOST is big enough for getnameinfo(3). OK benno@
Diffstat (limited to 'usr.sbin/traceroute')
-rw-r--r--usr.sbin/traceroute/traceroute.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/traceroute/traceroute.c b/usr.sbin/traceroute/traceroute.c
index 257cf69ff9d..89527f4ebb8 100644
--- a/usr.sbin/traceroute/traceroute.c
+++ b/usr.sbin/traceroute/traceroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: traceroute.c,v 1.135 2015/01/16 06:40:22 deraadt Exp $ */
+/* $OpenBSD: traceroute.c,v 1.136 2015/01/20 18:44:16 florian Exp $ */
/* $NetBSD: traceroute.c,v 1.10 1995/05/21 15:50:45 mycroft Exp $ */
/*
@@ -1459,7 +1459,7 @@ packet_ok6(struct msghdr *mhdr, int cc, int seq, int iflag)
return (ICMP6_DST_UNREACH_NOPORT + 1);
}
if (verbose) {
- char sbuf[NI_MAXHOST+1], dbuf[INET6_ADDRSTRLEN];
+ char sbuf[NI_MAXHOST], dbuf[INET6_ADDRSTRLEN];
u_int8_t *p;
int i;
@@ -1703,7 +1703,7 @@ in_cksum(u_short *addr, int len)
const char *
inetname(struct sockaddr *sa)
{
- static char line[NI_MAXHOST], domain[HOST_NAME_MAX+1 + 1];
+ static char line[NI_MAXHOST], domain[HOST_NAME_MAX + 1];
static int first = 1;
char *cp;