From mboxrd@z Thu Jan 1 00:00:00 1970 From: andrey mirtchovski To: 9fans@cse.psu.edu Subject: Re: [9fans] 4th edition file server available In-Reply-To: <20030114185517.14488.qmail@g.bio.cse.psu.edu> Message-ID: <20030114120717.I94385-100000@fbsd.acl.lanl.gov> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Tue, 14 Jan 2003 12:11:08 -0700 Topicbox-Message-UUID: 4136e48e-eacb-11e9-9e20-41e7f4b1d025 I agree, this opens up a whole new can of worms, as illustrated here: Miller, T. C., Raadt, T. D. strlcpy and strlcat -- Consistent, Safe, String Copy and Concatenation. Proceedings of USENIX Annual Technical Conference. June, 1999. http://www.openbsd.org/papers/strlcpy-paper.ps on the other hand I think we're in the unique position to fix strncpy instead of adding another syscall -- after all it's not Ken C we're dealing with :) andrey On Tue, 14 Jan 2003, Scott Schwartz wrote: > Andrey writes: > | < strncpy(system, p, sizeof system); > > That still has the problem that strncpy is not required to NUL terminate > the destination. How about strecpy? >