svn commit: r184935 - in head: contrib/telnet/telnetd
libexec/telnetd
Ed Schouten
ed at 80386.nl
Thu Nov 13 12:41:20 PST 2008
* Max Laier <max at 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 at 80386.nl>
WWW: http://80386.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-head/attachments/20081113/e6c8a3fe/attachment.pgp
More information about the svn-src-head
mailing list