From owner-freebsd-arch@FreeBSD.ORG Tue Dec 13 01:29:08 2005 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ADC3616A423 for ; Tue, 13 Dec 2005 01:29:08 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF70543D68 for ; Tue, 13 Dec 2005 01:28:58 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.48.2]) by phk.freebsd.dk (Postfix) with ESMTP id 05BDABC66; Tue, 13 Dec 2005 01:28:56 +0000 (UTC) To: George Paplas From: "Poul-Henning Kamp" In-Reply-To: Your message of "Mon, 12 Dec 2005 14:31:15 PST." <20051212223115.46960.qmail@web36306.mail.mud.yahoo.com> Date: Tue, 13 Dec 2005 02:28:56 +0100 Message-ID: <7898.1134437336@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: Peter Jeremy , arch@freebsd.org Subject: Re: printf behaviour with illegal or malformed format string X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2005 01:29:08 -0000 In message <20051212223115.46960.qmail@web36306.mail.mud.yahoo.com>, George Paplas writes: > > >--- Poul-Henning Kamp wrote: > >> >>If it is not set, the format string will be output unformatted in >> >>the message "WARNING: Illegal printf() format string: \"...\". >> > >> >Since this check presumably applies to the entire *printf() family, >> >where do you report the error for {s,f}printf()? >> >> Whereever the strings was meant to go, what else can I do ? > >And what if you are doing an sprintf to a buffer smaller than your >warning message? "Too f**king bad" It's the programmer who's made a mess in the first place, so he can't really make many demands in this situation... -- 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.