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

Unified Diff: base/time/time.h

Issue 2405453002: Fix Integer-overflow in base::Time::FromExploded. (Closed)
Patch Set: move method under ifdef 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/time/time_mac.cc » ('j') | base/time/time_mac.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/time/time.h
diff --git a/base/time/time.h b/base/time/time.h
index 12e43d9e7a02cf52711684f389a49ac5e51237f2..8a3610bde50ef2001b7a7dad9c7293baaba06b2e 100644
--- a/base/time/time.h
+++ b/base/time/time.h
@@ -545,7 +545,8 @@ class BASE_EXPORT Time : public time_internal::TimeBase<Time> {
// Converts an exploded structure representing either the local time or UTC
// into a Time class. Returns false on a failure when, for example, a day of
- // month is set to 31 on a 28-30 day month.
+ // month is set to 31 on a 28-30 day month. Returns maximum possible
miu 2016/10/18 19:55:13 IMO, if there is any overflow, this function shoul
maksims (do not use this acc) 2016/10/19 16:41:04 That's a typo. At first I thought it would be like
+ // platform dependent time on overflow.
static bool FromUTCExploded(const Exploded& exploded,
Time* time) WARN_UNUSED_RESULT {
return FromExploded(false, exploded, time);
« no previous file with comments | « no previous file | base/time/time_mac.cc » ('j') | base/time/time_mac.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698