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
[-- Attachment #1 --]
* 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 enough,
> > we already use 13 bytes ("/dev/pts/999", including '\0'). 32 bytes gives
> > us a little more freedom.
>
> > + strcpy(line, pn);
>
> 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.
--
Ed Schouten <ed@80386.nl>
WWW: http://80386.nl/
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)
iEYEARECAAYFAkkckO4ACgkQ52SDGA2eCwWmnQCdE2wtRd7KhD084OOEIMsxnmG3
8V4An2MmnqWOk3P+IxDu5xOKQcq14pge
=FUXj
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081113204118.GM81783>
