delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/12/10/15:37:57

Date: Tue, 10 Dec 2002 22:36:42 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
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: <E18LkKs-0000qc-00@phekda.freeserve.co.uk>
(rich AT phekda DOT freeserve DOT co DOT uk)
Subject: Re: scanf buffer overflow; support 'hh' conversion specifier [PATCH]
References: <E18LkKs-0000qc-00 AT phekda DOT freeserve DOT co DOT uk>
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

> Date: Tue, 10 Dec 2002 13:22:14 +0000
> From: "Richard Dawe" <rich AT phekda DOT freeserve DOT co DOT uk>
> 
> 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?

- Raw text -


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