delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/12/12/06:07:26

Sender: rich AT phekda DOT freeserve DOT co DOT uk
Message-ID: <3DF86A50.69057DB1@phekda.freeserve.co.uk>
Date: Thu, 12 Dec 2002 10:52:00 +0000
From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.23 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: scanf buffer overflow; support 'hh' conversion specifier [PATCH]
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1021212075124 DOT 15584C-100000 AT is>
Reply-To: djgpp-workers AT delorie DOT com

Hello.

Eli Zaretskii wrote:
[snip]
> I didn't follow the code to see why is this happening, but if hX produces
> a bug, can't we fix just that bug?

After thinking about it, hX will only produce a bug, if you think X should
behave as C99 describes. If X is a Borland compatibility thing, then it's may
be working OK. (Although I'm not sure why X is special-cased in the handling
of Borland-compatible type conversions.) My copy of K&R doesn't list X in the
table of type conversions, so I'm guessing X is a C99-thing.

OK, now I've confused myself. I'm not sure what Borland X is supposed to do.
Charles, I looked at your list from the Borland C++ 3.0 docs and it seemed
like you looked at the printf page, when you wrote:

"E - same as e with E for exponent
G - same as g with G for exponent
X - same as x with capital ABCDEF in output"

The word "output" makes me think you looked at the printf page.

> If we fix it, does it still contradict C99?

No.

Bye, Rich =]

-- 
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019