From owner-freebsd-audit Sun Jul 22 13:17:33 2001 Delivered-To: freebsd-audit@freebsd.org Received: from mail.rpi.edu (mail.rpi.edu [128.113.22.40]) by hub.freebsd.org (Postfix) with ESMTP id 6A44B37B401 for ; Sun, 22 Jul 2001 13:17:31 -0700 (PDT) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.acs.rpi.edu [128.113.24.47]) by mail.rpi.edu (8.11.3/8.11.3) with ESMTP id f6MKHOJ97664; Sun, 22 Jul 2001 16:17:24 -0400 Mime-Version: 1.0 X-Sender: drosih@mail.rpi.edu Message-Id: In-Reply-To: <20010718145258.1d829df6.david@phobia.ms> References: <20010718145258.1d829df6.david@phobia.ms> Date: Sun, 22 Jul 2001 16:17:22 -0400 To: David Hill , audit@FreeBSD.ORG From: Garance A Drosihn Subject: Re: strlcpy patches Content-Type: text/plain; charset="us-ascii" ; format="flowed" Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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