public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/3855] New: strtod("0x.") consumes too many characters
@ 2007-01-11  2:25 jsm28 at gcc dot gnu dot org
  2007-01-11 13:59 ` [Bug libc/3855] " jakub at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2007-01-11  2:25 UTC (permalink / raw)
  To: glibc-bugs

As an argument to strtod, "0x." has "0" as the longest valid numeric prefix. 
strtod (current CVS) wrongly treats the whole string as valid.  Testcase:

#include <stdlib.h>
int
main(void)
{
  const char *s = "0x.";
  char *ep;
  double r = strtod(s, &ep);
  if (r != 0)
    abort();
  if (ep != s + 1)
    abort();
  exit(0);
}

-- 
           Summary: strtod("0x.") consumes too many characters
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: jsm28 at gcc dot gnu dot org
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=3855

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-01-12 18:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-11  2:25 [Bug libc/3855] New: strtod("0x.") consumes too many characters jsm28 at gcc dot gnu dot org
2007-01-11 13:59 ` [Bug libc/3855] " jakub at redhat dot com
2007-01-11 16:58 ` jakub at redhat dot com
2007-01-11 17:38 ` drepper at redhat dot com
2007-01-12 18:23 ` cvs-commit at gcc dot gnu dot org

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).