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 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: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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/ ]