On Fri, Sep 07, 2001 at 03:19:35PM -0700, Bill Swingle wrote:
> On Fri, Sep 07, 2001 at 03:04:16PM -0700, Bill Swingle wrote:
> > -           strlcpy(packagesite, "", sizeof(packagesite));
> 
> Chris Costello recommended that I do this like this instead:
> 
> packagesite[0] = '\0'
> 
> Which seems to make sense since it lacks the overhead of strlcpy. Is
> there a "right" way to do this?

I think Chris's version is right, although if you're writing a
security app, or just want to be overly paranoid in general
you could use:

bzero((void *)packagesite, sizeof(packagesite));

-- 
Leo Bicknell - [EMAIL PROTECTED]
Systems Engineer - Internetworking Engineer - CCIE 3440
Read TMBG List - [EMAIL PROTECTED], www.tmbg.org

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to