diff options
| author | Martin v. Löwis <martin@v.loewis.de> | 2006-07-03 12:19:50 (GMT) |
|---|---|---|
| committer | Martin v. Löwis <martin@v.loewis.de> | 2006-07-03 12:19:50 (GMT) |
| commit | fcfff0a7fa6ece4c806b6e1a0a66b5ce214b9a28 (patch) | |
| tree | f7021d6ee71d28238772991a0f367cf632216485 /Python | |
| parent | 82c276ea332108056e2ca8905547fc184bfe0eb9 (diff) | |
| download | cpython-fcfff0a7fa6ece4c806b6e1a0a66b5ce214b9a28.zip cpython-fcfff0a7fa6ece4c806b6e1a0a66b5ce214b9a28.tar.gz cpython-fcfff0a7fa6ece4c806b6e1a0a66b5ce214b9a28.tar.bz2 | |
Bug #1417699: Reject locale-specific decimal point in float()
and atof().
Diffstat (limited to 'Python')
| -rw-r--r-- | Python/pystrtod.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Python/pystrtod.c b/Python/pystrtod.c index e1c84ea..6c19b45 100644 --- a/Python/pystrtod.c +++ b/Python/pystrtod.c @@ -90,6 +90,13 @@ PyOS_ascii_strtod(const char *nptr, char **endptr) p++; end = p; } + else if (strncmp(p, decimal_point, decimal_point_len) == 0) + { + /* Python bug #1417699 */ + *endptr = (char*)nptr; + errno = EINVAL; + return val; + } /* For the other cases, we need not convert the decimal point */ } |
