Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Dec 2000 08:30:05 +0100
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        Matt Dillon <dillon@earth.backplane.com>
Cc:        kris@citusc.usc.edu, Dag-Erling Smorgrav <des@ofug.org>, arch@FreeBSD.ORG
Subject:   Re: Safe string formatting in the kernel 
Message-ID:  <18190.976606205@critter>
In-Reply-To: Your message of "Mon, 11 Dec 2000 18:59:41 PST." <200012120259.eBC2xfb99004@earth.backplane.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
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.

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