From owner-freebsd-arch Tue Dec 12 8:13:56 2000 From owner-freebsd-arch@FreeBSD.ORG Tue Dec 12 08:13:52 2000 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from critter.freebsd.dk (flutter.freebsd.dk [212.242.40.147]) by hub.freebsd.org (Postfix) with ESMTP id E44E537B400 for ; Tue, 12 Dec 2000 08:13:51 -0800 (PST) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.1/8.11.1) with ESMTP id eBCGBve48906; Tue, 12 Dec 2000 17:11:57 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Julian Elischer Cc: Matt Dillon , kris@citusc.usc.edu, Dag-Erling Smorgrav , arch@FreeBSD.ORG Subject: Re: Safe string formatting in the kernel In-Reply-To: Your message of "Tue, 12 Dec 2000 04:50:22 PST." <3A361F0E.F015A262@elischer.org> Date: Tue, 12 Dec 2000 17:11:57 +0100 Message-ID: <48904.976637517@critter> From: Poul-Henning Kamp Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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