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