Mercurial > cpython-lru_cache-weakref
diff Python/pystrtod.c @ 38989:0e8a94ba2106 legacy-trunk
Bug #1417699: Reject locale-specific decimal point in float()
and atof().
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Mon, 03 Jul 2006 12:19:50 +0000 |
| parents | 3d1a99b39fca |
| children | 3fcaf6cc306d |
line wrap: on
line diff
--- a/Python/pystrtod.c Mon Jul 03 11:12:06 2006 +0000 +++ b/Python/pystrtod.c Mon Jul 03 12:19:50 2006 +0000 @@ -90,6 +90,13 @@ 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 */ }
