From owner-freebsd-arch Tue Dec 12 7:50: 2 2000 From owner-freebsd-arch@FreeBSD.ORG Tue Dec 12 07:49:57 2000 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mail.interware.hu (mail.interware.hu [195.70.32.130]) by hub.freebsd.org (Postfix) with ESMTP id CC0FE37B402 for ; Tue, 12 Dec 2000 07:49:56 -0800 (PST) Received: from luanda-36.budapest.interware.hu ([195.70.51.36] helo=elischer.org) by mail.interware.hu with esmtp (Exim 3.16 #1 (Debian)) id 145rgU-0004OO-00; Tue, 12 Dec 2000 16:49:43 +0100 Sender: julian@FreeBSD.ORG Message-ID: <3A361F0E.F015A262@elischer.org> Date: Tue, 12 Dec 2000 04:50:22 -0800 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: Poul-Henning Kamp Cc: Matt Dillon , kris@citusc.usc.edu, Dag-Erling Smorgrav , arch@FreeBSD.ORG Subject: Re: Safe string formatting in the kernel References: <18190.976606205@critter> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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? > > -- > 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 -- __--_|\ Julian Elischer / \ julian@elischer.org ( OZ ) World tour 2000 ---> X_.---._/ presently in: Budapest v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message