Index: base/third_party/dmg_fp/dtoa.cc |
diff --git a/base/third_party/dmg_fp/dtoa.cc b/base/third_party/dmg_fp/dtoa.cc |
index 502c16cc72f3ccc7ff217434ebf011e07acbf4a7..f3d793edc48be86dbf7e43839a0fe2e20f731d14 100644 |
--- a/base/third_party/dmg_fp/dtoa.cc |
+++ b/base/third_party/dmg_fp/dtoa.cc |
@@ -2597,8 +2597,11 @@ strtod |
if (c > '0' && c <= '9') { |
L = c - '0'; |
s1 = s; |
- while((c = *++s) >= '0' && c <= '9') |
+ while((c = *++s) >= '0' && c <= '9') { |
L = 10*L + c - '0'; |
+ if (L > DBL_MAX_10_EXP) |
+ break; |
+ } |
if (s - s1 > 8 || L > 19999) |
/* Avoid confusion from exponents |
* so large that e might overflow. |