Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Dec 2005 02:28:56 +0100
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        George Paplas <geopapl@yahoo.com>
Cc:        Peter Jeremy <PeterJeremy@optushome.com.au>, arch@freebsd.org
Subject:   Re: printf behaviour with illegal or malformed format string 
Message-ID:  <7898.1134437336@critter.freebsd.dk>
In-Reply-To: Your message of "Mon, 12 Dec 2005 14:31:15 PST." <20051212223115.46960.qmail@web36306.mail.mud.yahoo.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20051212223115.46960.qmail@web36306.mail.mud.yahoo.com>, George Paplas writes:
>
>
>--- Poul-Henning Kamp <phk@phk.freebsd.dk> 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.



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