Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Jul 2001 16:17:22 -0400
From:      Garance A Drosihn <drosih@rpi.edu>
To:        David Hill <david@phobia.ms>, audit@FreeBSD.ORG
Subject:   Re: strlcpy patches
Message-ID:  <p05101017b780e3a525c6@[128.113.24.47]>
In-Reply-To: <20010718145258.1d829df6.david@phobia.ms>
References:  <20010718145258.1d829df6.david@phobia.ms>

next in thread | previous in thread | raw e-mail | index | archive | help
At 2:52 PM -0400 7/18/01, David Hill wrote:
>Greetings.
>I have patched some source files replacing:
>
>       strncpy(dst, src, sizeof(dst) - 1);
>       dst[sizeof(dst)-1] = '\0';
>with
>       strlcpy(dst, src, sizeof dst);
>
>They are located at http://www.phobia.ms/patches

I have committed changes with similar intent to current for the
files under usr.sbin/lpr, and will MFC them next weekend.  I
then intend to do almost no work in freebsd for the month of
August (partially due to 4.4, and partially because I'll be too
busy here at work).  If no one else has picked up your strlcpy
changes by the time I get back to making changes, I'll see about
applying these patches to other source files.

Usually I wouldn't wander too far outside of lpr, but strncpy()
calls for destinations which ARE supposed to be null-terminated
have always bugged me...

-- 
Garance Alistair Drosehn            =   gad@eclipse.acs.rpi.edu
Senior Systems Programmer           or  gad@freebsd.org
Rensselaer Polytechnic Institute    or  drosih@rpi.edu

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?p05101017b780e3a525c6>