diff options
author | dim <dim@FreeBSD.org> | 2011-06-26 19:03:33 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-06-26 19:03:33 +0000 |
commit | d2ac8b8fc00997a88c5e276ae185aa67237adfea (patch) | |
tree | e7a60232ea3fe976f79760884593afc7f13a45cd /contrib/traceroute | |
parent | e9ebd6639ddfde813ebdd9882ef630063a45db60 (diff) | |
download | FreeBSD-src-d2ac8b8fc00997a88c5e276ae185aa67237adfea.zip FreeBSD-src-d2ac8b8fc00997a88c5e276ae185aa67237adfea.tar.gz |
For some reason, contrib/traceroute/traceroute.c ensures MAXHOSTNAMELEN
is defined, but then proceeds to use a hardcoded maximum hostname length
of 64 anyway. Fix this by checking against MAXHOSTNAMELEN instead.
PR: bin/157732
MFC after: 3 days
Diffstat (limited to 'contrib/traceroute')
-rw-r--r-- | contrib/traceroute/traceroute.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/traceroute/traceroute.c b/contrib/traceroute/traceroute.c index 2a5fea2..1c98262 100644 --- a/contrib/traceroute/traceroute.c +++ b/contrib/traceroute/traceroute.c @@ -1618,7 +1618,7 @@ gethostinfo(register char *hostname) register char **p; register u_int32_t addr, *ap; - if (strlen(hostname) > 64) { + if (strlen(hostname) >= MAXHOSTNAMELEN) { Fprintf(stderr, "%s: hostname \"%.32s...\" is too long\n", prog, hostname); exit(1); |