From owner-svn-src-stable-8@FreeBSD.ORG Wed Jun 29 16:43:45 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D9F5106566C; Wed, 29 Jun 2011 16:43:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CD6E8FC1A; Wed, 29 Jun 2011 16:43:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p5TGhjwX005672; Wed, 29 Jun 2011 16:43:45 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p5TGhjiA005670; Wed, 29 Jun 2011 16:43:45 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201106291643.p5TGhjiA005670@svn.freebsd.org> From: Dimitry Andric Date: Wed, 29 Jun 2011 16:43:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r223678 - stable/8/contrib/traceroute X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jun 2011 16:43:45 -0000 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);