Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Dec 2000 17:11:57 +0100
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        Julian Elischer <julian@elischer.org>
Cc:        Matt Dillon <dillon@earth.backplane.com>, kris@citusc.usc.edu, Dag-Erling Smorgrav <des@ofug.org>, arch@FreeBSD.ORG
Subject:   Re: Safe string formatting in the kernel 
Message-ID:  <48904.976637517@critter>
In-Reply-To: Your message of "Tue, 12 Dec 2000 04:50:22 PST." <3A361F0E.F015A262@elischer.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <3A361F0E.F015A262@elischer.org>, Julian Elischer writes:
>Poul-Henning Kamp wrote:
>> 
>> In message <200012120259.eBC2xfb99004@earth.backplane.com>, Matt Dillon writes:
>> 
>> >    sprintf(), strcpy(), and strcat().  But why not just replace those
>> >    functions with an snprintf() equivalent?  I don't think we really need
>> >    a dynamic string allocation mechanism in the kernel, there is virtually
>> >    nowhere where it would actually be of any use.
>> 
>> There are several places where this new API would make the code
>> simpler and less prone to overflowable errors.  procfs and various
>> netgraph nodes spring to mind immediately.
>
>hmmm such as?

The "config" and "status" returns.

--
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48904.976637517>