mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 22:36:09 +03:00
19 lines
585 B
Diff
19 lines
585 B
Diff
diff --git a/base/third_party/dmg_fp/dtoa.cc b/base/third_party/dmg_fp/dtoa.cc
|
|
index c0a51c2..ab4e056 100644
|
|
--- a/base/third_party/dmg_fp/dtoa.cc
|
|
+++ b/base/third_party/dmg_fp/dtoa.cc
|
|
@@ -2674,8 +2674,11 @@ strtod
|
|
if (c > '0' && c <= '9') {
|
|
L = c - '0';
|
|
s1 = s;
|
|
- while((c = *++s) >= '0' && c <= '9')
|
|
- L = 10*L + c - '0';
|
|
+ while((c = *++s) >= '0' && c <= '9') {
|
|
+ if (L < (INT_MAX - 10) / 10) {
|
|
+ L = 10*L + (c - '0');
|
|
+ }
|
|
+ }
|
|
if (s - s1 > 8 || L > 19999)
|
|
/* Avoid confusion from exponents
|
|
* so large that e might overflow.
|