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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « base/third_party/dmg_fp/dtoa.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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.
OLDNEW
« 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