Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Dec 2000 14:14:11 -0500
From:      Chris Faulhaber <jedgar@fxp.org>
To:        Mike Heffner <mheffner@vt.edu>
Cc:        freebsd-audit@FreeBSD.org
Subject:   Re: libutil diff
Message-ID:  <20001206141411.A21225@peitho.fxp.org>
In-Reply-To: <XFMail.20001206125653.mheffner@vt.edu>; from mheffner@vt.edu on Wed, Dec 06, 2000 at 12:56:53PM -0500
References:  <20001206105523.A52977@peitho.fxp.org> <XFMail.20001206125653.mheffner@vt.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Dec 06, 2000 at 12:56:53PM -0500, Mike Heffner wrote:
> 
> On 06-Dec-2000 Chris Faulhaber wrote:
> 
> [snip]
> 
> |  -                                            strcpy(name, line);
> |  +                                            strlcpy(name, line,
> sizeof(name));
> 
> name is a char* passed into the function, so therefore sizeof(name) == 4
> 
> The manpage states:
> 
>     If the argument name is not NULL, openpty() copies the pathname of the
>     slave pty to this area.  The caller is responsible for allocating the re-
>     quired space in this array.
> 
> I think it should also mention the length required for name (ie.
> sizeof(line)).
> 

agreed

-- 
Chris D. Faulhaber - jedgar@fxp.org - jedgar@FreeBSD.org
--------------------------------------------------------
FreeBSD: The Power To Serve   -   http://www.FreeBSD.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




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