Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Nov 2008 21:41:18 +0100
From:      Ed Schouten <ed@80386.nl>
To:        Max Laier <max@love2party.net>
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
Message-ID:  <20081113204118.GM81783@hoeg.nl>
In-Reply-To: <200811132111.45492.max@love2party.net>
References:  <200811131905.mADJ5SJJ066541@svn.freebsd.org> <200811132111.45492.max@love2party.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--DH4/xewco2zMcht6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* Max Laier <max@love2party.net> 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 <ed@80386.nl>
 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081113204118.GM81783>