Index: net/ftp/ftp_util.cc |
diff --git a/net/ftp/ftp_util.cc b/net/ftp/ftp_util.cc |
index 00b23b7c10b771daea8da81324fbc4fcc9f4249a..30b7042c2f530f27776b82083bf872c3670bea3a 100644 |
--- a/net/ftp/ftp_util.cc |
+++ b/net/ftp/ftp_util.cc |
@@ -286,7 +286,9 @@ bool FtpUtil::LsDateListingToTime(const base::string16& month, |
} |
// We don't know the time zone of the listing, so just use local time. |
- *result = base::Time::FromLocalExploded(time_exploded); |
+ if (!base::Time::FromLocalExploded(time_exploded, result)) { |
+ return false; |
+ } |
return true; |
} |
@@ -348,8 +350,10 @@ bool FtpUtil::WindowsDateListingToTime(const base::string16& date, |
} |
} |
- // We don't know the time zone of the server, so just use local time. |
- *result = base::Time::FromLocalExploded(time_exploded); |
+ // We don't know the time zone of the listing, so just use local time. |
+ if (!base::Time::FromLocalExploded(time_exploded, result)) { |
+ return false; |
+ } |
return true; |
} |