OLD | NEW |
(Empty) | |
| 1 diff --git a/base/third_party/dmg_fp/dtoa.cc b/base/third_party/dmg_fp/dtoa.cc |
| 2 index 502c16c..f3d793e 100644 |
| 3 --- a/base/third_party/dmg_fp/dtoa.cc |
| 4 +++ b/base/third_party/dmg_fp/dtoa.cc |
| 5 @@ -2597,8 +2597,11 @@ strtod |
| 6 if (c > '0' && c <= '9') { |
| 7 L = c - '0'; |
| 8 s1 = s; |
| 9 - while((c = *++s) >= '0' && c <= '9') |
| 10 + while((c = *++s) >= '0' && c <= '9') { |
| 11 L = 10*L + c - '0'; |
| 12 + if (L > DBL_MAX_10_EXP) |
| 13 + break; |
| 14 + } |
| 15 if (s - s1 > 8 || L > 19999) |
| 16 /* Avoid confusion from exponents |
| 17 * so large that e might overflow. |
OLD | NEW |