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

Unified Diff: media/ffmpeg/ffmpeg_common.cc

Issue 2405453002: Fix Integer-overflow in base::Time::FromExploded. (Closed)
Patch Set: rebased and fixed net unittest 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
Index: media/ffmpeg/ffmpeg_common.cc
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
index 8c4a55c953111de0613d6692408f739b541428b5..aaf3afcd5de754f1b2371deb3565ae466d3bd5bb 100644
--- a/media/ffmpeg/ffmpeg_common.cc
+++ b/media/ffmpeg/ffmpeg_common.cc
@@ -753,6 +753,9 @@ bool FFmpegUTCDateToTime(const char* date_utc, base::Time* out) {
base::Time::Exploded exploded;
exploded.millisecond = 0;
+ // This field cannot be uninitialized. Unless not modified, make it 0 here
+ // then.
+ exploded.day_of_week = 0;
if (base::StringToInt(date_fields[0], &exploded.year) &&
base::StringToInt(date_fields[1], &exploded.month) &&
base::StringToInt(date_fields[2], &exploded.day_of_month) &&
« no previous file with comments | « components/data_reduction_proxy/core/browser/data_usage_store_unittest.cc ('k') | media/formats/webm/webm_info_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698