delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/03/17/13:00:18

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <38D272CF.856E1346@Sparta.Com>
Date: Fri, 17 Mar 2000 13:00:48 -0500
From: Mark Rahner <mark_rahner AT Sparta DOT Com>
X-Mailer: Mozilla 4.7 [en] (Win98; I)
X-Accept-Language: en,pdf
MIME-Version: 1.0
To: cygwin AT sourceware DOT cygnus DOT com
CC: newlib AT sourceware DOT cygnus DOT com
Subject: Re: sscanf() %n Bug Introduced in 20000221 Snapshot
References: <38D14C36 DOT F60C9191 AT Sparta DOT Com> <20000316164824 DOT A29342 AT cygnus DOT com>

Before making my initial post, I verified that the bug was still present in the 20000309
snapshot.  I've cc'ed this message to the newlib address you suggested.

-Mark

Chris Faylor wrote:

> sscanf comes from the newlib library.  Try sending email to newlib AT sourceware DOT cygnus DOT com.
>
> Also, try a new snapshot.
>
> cgf
>
> On Thu, Mar 16, 2000 at 04:03:50PM -0500, Mark Rahner wrote:
> >I apologize for sending an HTML formatted message last time.  Here's the
> >plain text version...
> >
> >This message documents a problem with sscanf() %n format specification
> >which began, to the best of my knowledge, with the 20000221 snapshot.
> >This problem did not exist in the 20000211 snapshot.  I'm using
> >Windows98 and Cygwin Beta 20.1 with upgrades consisting of Mumit's
> >2.95.2 compiler and the 200000221 snapshot.
> >
> >Compiling the following using "g++ sscanfBug.C -o sscanfBug.exe"
> >
> >     #include <stdio.h>
> >     #include <iostream>
> >
> >     int main () {
> >
> >         const char *str = "0.02";
> >         double num;
> >         int len;
> >
> >         cerr << "str is <" << str << ">\n";
> >
> >         sscanf( str, "%lf%n", &num, &len );
> >
> >         cerr << "num is <" << num << ">\n";
> >         cerr << "len is <" << len << ">\n";
> >     }
> >
> >produces an executable which, when run, writes the following to standard
> >error:
> >
> >     str is <0.02>
> >     num is <0.02>
> >     len is <2>
> >
> >The correct value for len is 4.  Please note that this is not the same
> >problem discussed on this mailing list last June.  Specifically, there
> >is no space preceding %n.  I apologize in advance for not presenting you
> >with a patch; after briefly attempting to track this bug myself, I
> >realized that I wasn't getting anywhere.
> >
> >Hope this helps,
> >Mark Rahner
>
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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