|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r85816 - branches/release/boost/chrono/io
From: vicente.botet_at_[hidden]
Date: 2013-09-22 03:29:16
Author: viboes
Date: 2013-09-22 03:29:15 EDT (Sun, 22 Sep 2013)
New Revision: 85816
URL: http://svn.boost.org/trac/boost/changeset/85816
Log:
Chrono: initialize std::tm variables to all 0 to fix #9147.
Text files modified:
branches/release/boost/chrono/io/time_point_io.hpp | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
Modified: branches/release/boost/chrono/io/time_point_io.hpp
==============================================================================
--- branches/release/boost/chrono/io/time_point_io.hpp Sat Sep 21 16:45:06 2013 (r85815)
+++ branches/release/boost/chrono/io/time_point_io.hpp 2013-09-22 03:29:15 EDT (Sun, 22 Sep 2013) (r85816)
@@ -270,6 +270,7 @@
case 'A':
{
std::tm tm2;
+ std::memset(&tm2, 0, sizeof(std::tm));
that_.get_weekday(b, e, iob, err, &tm2);
//tm->tm_wday = tm2.tm_wday;
}
@@ -279,6 +280,7 @@
case 'h':
{
std::tm tm2;
+ std::memset(&tm2, 0, sizeof(std::tm));
that_.get_monthname(b, e, iob, err, &tm2);
//tm->tm_mon = tm2.tm_mon;
}
@@ -879,6 +881,7 @@
std::locale loc = os.getloc();
time_t t = system_clock::to_time_t(time_point_cast<system_clock::duration>(tp));
std::tm tm;
+ std::memset(&tm, 0, sizeof(std::tm));
if (tz == timezone::local)
{
#if defined BOOST_WINDOWS && ! defined(__CYGWIN__)
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk