From: Andreas Schwab <schwab@redhat.com>
To: dje@google.com (Doug Evans)
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] Handle 0 result from sscanf when parsing fp values.
Date: Tue, 17 Aug 2010 08:18:00 -0000 [thread overview]
Message-ID: <m3vd79hcti.fsf@hase.home> (raw)
In-Reply-To: <20100817003114.087EA84B8F@ruffy.mtv.corp.google.com> (Doug Evans's message of "Mon, 16 Aug 2010 17:31:13 -0700 (PDT)")
dje@google.com (Doug Evans) writes:
> Index: objc-exp.y
> ===================================================================
> RCS file: /cvs/src/src/gdb/objc-exp.y,v
> retrieving revision 1.38
> diff -u -p -u -p -r1.38 objc-exp.y
> --- objc-exp.y 5 Mar 2010 20:18:14 -0000 1.38
> +++ objc-exp.y 17 Aug 2010 00:17:29 -0000
> @@ -1016,8 +1016,9 @@ parse_number (p, len, parsed_float, puti
>
> /* It's a float since it contains a point or an exponent. */
>
> - sscanf (p, "%" DOUBLEST_SCAN_FORMAT "%c",
> - &putithere->typed_val_float.dval, &c);
> + if (sscanf (p, "%" DOUBLEST_SCAN_FORMAT "%c",
> + &putithere->typed_val_float.dval, &c) != 1)
Shouldn't that be "< 1" since there can be two conversions?
Andreas.
--
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84 5EC7 45C6 250E 6F00 984E
"And now for something completely different."
next prev parent reply other threads:[~2010-08-17 8:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-17 0:31 Doug Evans
2010-08-17 8:18 ` Andreas Schwab [this message]
2010-08-17 11:37 ` Doug Evans
2010-08-18 20:38 ` Doug Evans
2010-08-20 7:34 ` [patch] Fix new FAIL `reject p 0x1.1' [Re: [patch] Handle 0 result from sscanf when parsing fp values.] Jan Kratochvil
2010-08-20 7:37 ` [patch] Fix new FAIL `reject p 0x1.1' [fixup] " Jan Kratochvil
2010-08-20 11:58 ` Joseph S. Myers
2010-08-23 15:35 ` Doug Evans
2010-08-23 18:55 ` [patch] Fix new FAIL `reject p 0x1.1' [fixup] Jan Kratochvil
2010-08-23 19:49 ` Doug Evans
2010-08-23 19:57 ` Doug Evans
2010-08-31 19:38 ` Jan Kratochvil
2010-08-31 22:51 ` Doug Evans
2010-09-02 15:11 ` Jan Kratochvil
2010-09-06 22:29 ` Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3vd79hcti.fsf@hase.home \
--to=schwab@redhat.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).