Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3797)

Unified Diff: base/third_party/dmg_fp/exp_length.patch

Issue 2296503003: Fix parsing of exponents in StringToDouble. (Closed)
Patch Set: better comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/third_party/dmg_fp/dtoa.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/third_party/dmg_fp/exp_length.patch
diff --git a/base/third_party/dmg_fp/exp_length.patch b/base/third_party/dmg_fp/exp_length.patch
new file mode 100644
index 0000000000000000000000000000000000000000..65d033a403e9f3bf884c59edc016f2771290126f
--- /dev/null
+++ b/base/third_party/dmg_fp/exp_length.patch
@@ -0,0 +1,17 @@
+diff --git a/base/third_party/dmg_fp/dtoa.cc b/base/third_party/dmg_fp/dtoa.cc
+index 502c16c..f3d793e 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.
« no previous file with comments | « base/third_party/dmg_fp/dtoa.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698