Re: [Boost-bugs] [Boost C++ Libraries] #3334: use of secure gmtime_s and localtime_s for vs2005 and up.

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3334: use of secure gmtime_s and localtime_s for vs2005 and up.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-09-03 11:39:20


#3334: use of secure gmtime_s and localtime_s for vs2005 and up.
-------------------------------+--------------------------------------------
 Reporter: courteau@… | Owner: az_sw_dude
     Type: Patches | Status: new
Milestone: Boost 1.40.0 | Component: date_time
  Version: Boost 1.39.0 | Severity: Problem
 Keywords: gmtime, localtime |
-------------------------------+--------------------------------------------

Comment(by Farid Zaripov <faridz@…>):

> Also, with the previous implementation the buffer received was not
 filled, only the return pointer was ok

 The return pointer is not ok! The code below fails on assert:

 {{{
     const std::time_t tt = std::time(0);
     std::tm tms;
     const std::tm * ptm = boost::date_time::c_time::localtime(&tt, &tms);
     assert(&tms == ptm);
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3334#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC