Date: Wed, 29 Jun 2011 16:43:45 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r223678 - stable/8/contrib/traceroute Message-ID: <201106291643.p5TGhjiA005670@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Wed Jun 29 16:43:44 2011 New Revision: 223678 URL: http://svn.freebsd.org/changeset/base/223678 Log: MFC r223579: 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 Modified: stable/8/contrib/traceroute/traceroute.c Directory Properties: stable/8/contrib/traceroute/ (props changed) Modified: stable/8/contrib/traceroute/traceroute.c ============================================================================== --- stable/8/contrib/traceroute/traceroute.c Wed Jun 29 16:40:41 2011 (r223677) +++ stable/8/contrib/traceroute/traceroute.c Wed Jun 29 16:43:44 2011 (r223678) @@ -1625,7 +1625,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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106291643.p5TGhjiA005670>