From owner-svn-src-head@FreeBSD.ORG Thu Nov 13 20:41:20 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 230AA1065674; Thu, 13 Nov 2008 20:41:20 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id B49E38FC0A; Thu, 13 Nov 2008 20:41:19 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id EB30E1D2A4; Thu, 13 Nov 2008 21:41:18 +0100 (CET) Date: Thu, 13 Nov 2008 21:41:18 +0100 From: Ed Schouten To: Max Laier Message-ID: <20081113204118.GM81783@hoeg.nl> References: <200811131905.mADJ5SJJ066541@svn.freebsd.org> <200811132111.45492.max@love2party.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DH4/xewco2zMcht6" Content-Disposition: inline In-Reply-To: <200811132111.45492.max@love2party.net> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184935 - in head: contrib/telnet/telnetd libexec/telnetd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 20:41:20 -0000 --DH4/xewco2zMcht6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Max Laier wrote: > On Thursday 13 November 2008 20:05:28 Ed Schouten wrote: > > I've also increased the size of line[]. Even though 16 should be enou= gh, > > we already use 13 bytes ("/dev/pts/999", including '\0'). 32 bytes gi= ves > > us a little more freedom. >=20 > > + strcpy(line, pn); >=20 > Why not use str{l,n}cpy then ... even if it's big enough now. Good idea. I've just replaced this strcpy() call with strlcpy(). If strlcpy() fails (returning `sizeof line' or greater), we just bail out. --=20 Ed Schouten WWW: http://80386.nl/ --DH4/xewco2zMcht6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkkckO4ACgkQ52SDGA2eCwWmnQCdE2wtRd7KhD084OOEIMsxnmG3 8V4An2MmnqWOk3P+IxDu5xOKQcq14pge =FUXj -----END PGP SIGNATURE----- --DH4/xewco2zMcht6--