This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/3855] New: strtod("0x.") consumes too many characters
- From: "jsm28 at gcc dot gnu dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 11 Jan 2007 02:25:44 -0000
- Subject: [Bug libc/3855] New: strtod("0x.") consumes too many characters
- Reply-to: sourceware-bugzilla at sourceware dot org
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.