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

Unified Diff: base/third_party/dmg_fp/dtoa.cc

Issue 2451573005: Fix integer-overflow in dmg_fp::strtod (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | base/third_party/dmg_fp/exp_length.patch » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ab4e0566895aaade2ed8248d3105ed61337af66c..19dbdebd63ccc4a9bec2dc20ee19792856cb5587 100644
--- a/base/third_party/dmg_fp/dtoa.cc
+++ b/base/third_party/dmg_fp/dtoa.cc
@@ -2676,7 +2676,7 @@ strtod
s1 = s;
while((c = *++s) >= '0' && c <= '9') {
if (L < (INT_MAX - 10) / 10) {
- L = 10*L + c - '0';
+ L = 10*L + (c - '0');
}
}
if (s - s1 > 8 || L > 19999)
« no previous file with comments | « no previous file | base/third_party/dmg_fp/exp_length.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698