Date: Wed, 18 Jul 2001 18:47:39 -0400 From: Garance A Drosihn <drosih@rpi.edu> To: David Hill <david@phobia.ms>, audit@FreeBSD.ORG Subject: Re: strlcpy patches Message-ID: <p05101005b77bbe74584a@[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: >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 > >What are your thoughts? Speaking only wrt usr.sbin/lpr, I have been working on doing like this sometime soon. In fact, I would have finished it last weekend except that I got sidetracked while working on some of my other lpr changes. However, I don't much like changing strncpy(...) to (void)strlcpy(...) Some of the str*cpy() calls also need to be changed for other reasons, as I remember, so I'll want to look this over more closely before doing the lpr changes. Some changes along these lines will (hopefully!) go into lpr this weekend, but I can't speak for the rest of the patches you've made. -- 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?p05101005b77bbe74584a>