Date: Tue, 10 Dec 2002 22:36:42 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: djgpp-workers AT delorie DOT com Message-Id: <9743-Tue10Dec2002223639+0200-eliz@is.elta.co.il> X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9 In-reply-to: (rich AT phekda DOT freeserve DOT co DOT uk) Subject: Re: scanf buffer overflow; support 'hh' conversion specifier [PATCH] References: Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Date: Tue, 10 Dec 2002 13:22:14 +0000 > From: "Richard Dawe" > > The code that causes the buffer overflow is the special handling > for capitalised letters (for compatibility with Borland C) - D, I, U > and O. For some reason X was included in this too. I think the code > mistakenly sets 'size' to LONG for X. I think it should leave it alone > and let 'size' be set by the normal mechanisms - 'h', 'l', 'll', etc. I recall vaguely that some Borland compatibility is involved here. Can someone please check with Borland C and Turbo C?